Disable Google Analytics
-
Hello i’ve used your function:
add_action( 'wp_head', 'my_google_opt_out' ); function my_google_opt_out() { if ( ! is_allowed_cookie( '_ga' ) ) { ?> <script> window['ga-disable-UA-xxxxxxx-x'] = true; </script> <?php } }
But it disable’s Google analytics Cookies even if i allow the “_ga, _gid, _gat” Cookie section.
- The topic ‘Disable Google Analytics’ is closed to new replies.