• Hi Everyone,

    I am trying to get the below code to work in my Google Analytics by Yoast plugin.

    I have the below setup in my custom code section but it’s not working? Is it because I am using the universal tracking code? How do I update this to work with the Universal code?

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’,’UA-XXXXXXX-1′]);
    _gaq.push([‘_setSiteSpeedSampleRate’, 100]);
    _gaq.push([‘_trackPageLoadTime’]);
    _gaq.push([‘_trackPageview’]);

    Thanks!

    https://wordpress.org/plugins/google-analytics-for-wordpress/

Viewing 1 replies (of 1 total)
  • Thread Starter myatix

    (@myatix)

    Will this work?

    ga(‘create’, ‘UA-xxxxxxx-1’, {
    ‘cookieDomain’: ‘mydomain.com’,
    ‘siteSpeedSampleRate’: 100
    });
    ga(‘send’, ‘pageview’);

Viewing 1 replies (of 1 total)
  • The topic ‘Google Analytics SiteSpeed and PageLoadTime for Universal Code?’ is closed to new replies.