I’m not an expert in Google stuff, but if your tracking code matches the code example provided in the official Google docs, then it must be correct. Have a look at your source code, about halfway down the page you can view the GA tracking code, so you can compare it with whatever Google technique/docs you are following to make sure it is correct.
-
This reply was modified 6 years, 3 months ago by
Jeff Starr.
I also want to change the sitespeedsample rate for a website that has very low traffic. When I inserted the code, the source code is:
ga(‘create’, ‘UA-59040974-2’, ‘auto’, {‘siteSpeedSampleRate’: 100})
when what I actually want is:
ga(‘create’, ‘UA-59040974-2’, {‘siteSpeedSampleRate’: 100})
Is there a method to remove the ‘auto’ argument?
Hi Charles, it’s not possible with the current version, but I will add a way to do it for the next plugin update. Thank you for the feedback.
Just to follow up with this, the upcoming version of the plugin includes a new filter hook that enables disabling of the 'auto' argument. Here is an example of how to use it:
function ga_google_analytics_enable_auto($enable) { return false; }
add_filter('ga_google_analytics_enable_auto', 'ga_google_analytics_enable_auto');
No edits required, just add to WordPress functions or custom plugin and done.