Skip to content

Instantly share code, notes, and snippets.

@lupin72
Created June 2, 2018 15:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lupin72/91b7f744beb0478c805e9a26b504b753 to your computer and use it in GitHub Desktop.
Save lupin72/91b7f744beb0478c805e9a26b504b753 to your computer and use it in GitHub Desktop.
How to block Monterinsights' Google Analytics Cookies with iubenda Cookie Solution for GDPR
function block_monsterinsights_cookies($attr) {
$attr['type'] = "text/plain";
$attr['class'] = '_iub_cs_activate';
return $attr;
}
add_filter('monsterinsights_tracking_analytics_script_attributes', 'block_monsterinsights_cookies', 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment