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.
We wrote a complete guide on how to change the graph color to match with your web design.
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' );
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' );
Replace “your-url.com” 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 = 'your-url.com';
return $url;
}
add_filter( 'analytify_email_dashboard_url', 'analytify_email_dashboard_url_cb' );
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' );
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');
If you have any doubts or questions related to this matter, please don’t hesitate to contact our support team.