• Resolved kevindp

    (@kevindp)


    We’re using Autoptimize on our website. Our Google Analytics account is tracking this website and appears to be working properly. However, I’d like to see the actual Google Analytics website tracking code that is on the site. Where / how can I find this? All that I see in the code is:

    jQuery(document).ready(function () {
    jQuery.post(‘https://SITEURL.com?ga_action=googleanalytics_get_script’, {action: ‘googleanalytics_get_script’}, function(response) {
    var F = new Function ( response );
    return( F() );
    });
    });</script>

    I’d like to be able to see the code itself, which should read:

    <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,’script’,’https://www.google-analytics.com/analytics.js&#8217;,’ga’);

    ga(‘create’, ‘UACODEGOESHERE’, ‘auto’);
    ga(‘send’, ‘pageview’);

    </script>

    Thank you in advance for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    the “normal” GA code you mention, is never touched by AO actually, so it seems (as confirmed by the googleanalytics_get_script code), that you’re using a plugin which does things … differently. this will very likely also be the case when you test your site without AO by adding ?ao_noptimize=1 to the URL.

    frank

    Thread Starter kevindp

    (@kevindp)

    Makes sense. Given that’s the case, I think the culprit is actually the ShareThis Google Analytics plugin. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where can I find Google Analytics code?’ is closed to new replies.