Print This page

Analytify Filters

Analytify Filters narrow down the data you want to analyze in your WordPress website’s Google Analytics integration. These filters help you focus on specific segments of data and extract valuable insights.

Change Comparison Graph Color In Analytify Dashboard

We wrote a complete guide on how to change the graph color to match with your web design.

Hide The Navigation Tabs In Analytify’s Dashboard

In the following method, uncomment ( remove “//” ) from the items that you want to hide on Analytify’s dashboard page. Each item represents the name of the navigation tab.

* Hide the navigation tabs from the Analytify dashboard.
* @param array $tab_items
* @return array
function analytify_hide_dashboard_tabs_cb( $tab_items )
// Add the names of items you want to hide.
$hide_tabs = array(
// 'Forms Tracking',
// 'Events Tracking',
// 'Campaigns',
// 'Goals',
// 'WooCommerce',
// 'EDD',
// 'Authors',
// 'Demographics',
// 'Search Terms',
// 'Dimensions',
// 'Real-Time',
// 'Conversions',
// 'Acquisition',
// 'Monetization',
// 'Engagement',
return $hide_tabs;
add_filter( 'analytify_hide_dashboard_tabs', 'analytify_hide_dashboard_tabs_cb' );

Stop The Animation In Analytify’s Dashboard

In the following method, return false to stop the animation on the Analytify’s dashboard. The default value is true.

* Control analytify dashboard header animation.
* Retrun true to play animation and false to prevent it.
* @param bool $condition
* @return bool
function analytify_dashboard_head_animate_cb( $condition ) {
return false;
add_filter( 'analytify_dashboard_head_animate', 'analytify_dashboard_head_animate_cb' );

Change the “Go To Dashboard” Button’s URL in Email Report

Replace “” in the following filter with your own URL.

* Filter email report dashboarl url.
* @param string $url
* @return string
function analytify_email_dashboard_url_cb( $url ) {
$url = '';
return $url;
add_filter( 'analytify_email_dashboard_url', 'analytify_email_dashboard_url_cb' );

Remove Analytify HTML Comments From Page Source Code View

Analytify includes opening and closing comments in the tracking code it adds to the page. If you want to remove those comments from the page, you can use this handy filter.

add_filter( 'analytify_tracking_code_comments', '__return_false' );

Customize Analytify Stats Cache Duration

Take control of the cache duration for Analytify stats with ease. By default, Analytify fetches new stats every 10 or 24 hours, depending on your settings. If you have enabled the “Delete Cache” option under Analytify -> Settings -> Dashboard, the cache time is set to 10 hours. Otherwise, it remains at 24 hours.

It is advisable not to set the cache time too low, as Google Analytics data typically updates within 10 to 24 hours.

You prefer a shorter cache time, you can utilize the following filter. Simply specify the desired duration in seconds, and the cache time will be adjusted accordingly.

function modify_analytify_stats_cache_time()
    $cache_time = 60*60*5; // Set the cache time to 5 hours in seconds
    return $cache_time;

add_filter('analytify_stats_cache_time', 'modify_analytify_stats_cache_time');

Set Custom Number of Rows Per Page of Top Cities Section in Analytify Dashboard Widget

We have introduced this new filter to set custom number of rows for the Top Cities Section within our Analytify dashboard widget. By default it just shows 5 top cities per page in the widget. Now you can show any number of rows on each page of the top cities section using the following filter. Here we have set the number of rows as 10 for example:

 * Filter for setting the number of rows per page in Top Cities Section
 *  @param $value
 *  @return rows
add_filter('analytify_widget_top_cities_per_page', static function ($value) {
	return $value = 10;

Change Analytify Dashboard Graph Type (Line to Bar)

We have introduced another new filter to change the visitors/views graph type on your Analytify overview dashboard. By default the graph type is set as a line chart, but now you can use the following filter to change it to a bar graph if you want. It will display the graph in a bar chart format on your Analytify overview dashboard.

 * Change dashboard graph type using this filter
 * @var $type the type value can be line or bar

	static function ( $type ) {
		return $type = 'bar';

If you have any doubts or questions related to this matter, please don’t hesitate to contact our support team.