• Resolved Alwin

    (@wp-opti)


    Hello, just installed this plugin for the first time and it looks great!

    Now I like to add code to increase the sitespeedsample rate. So I added this code to the “Custom Tracker Objects” field:
    {‘siteSpeedSampleRate’: 100}

    Is this a good way to do this? Or should the code be added in a different way, or in antoher field?

    Thanks,
    Alwin

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    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 5 years, 1 month 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?

    Plugin Author Jeff Starr

    (@specialk)

    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.

    Plugin Author Jeff Starr

    (@specialk)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘siteSpeedSampleRate’ is closed to new replies.