Download

Analytify and Cookie Notice

Since 2.1.8, Analytify added the full support for “Cookie Notice for GDPR”. Analytify will not track the user until he/she accept the cookie. To add this feature add the below code in your theme functions.php file.


/**
* Add GA code if cookie is accepted.
*
*/
function analytify_cookies_notice_compatibility( $ga_code ) {
// if cookie notice installed and cookie not accepted. Don't add tracking code.
if ( function_exists('cn_cookies_accepted') && ! cn_cookies_accepted() ) {
return '';
}
return $ga_code;
}
add_filter( 'analytify_ga_script', 'analytify_cookies_notice_compatibility' );

Leave a Reply

Your email address will not be published. Required fields are marked *