Google Analytics by MonsterInsights
Enabling New Page Speed Measurement (3 posts)

  1. luciano-passuello
    Posted 5 years ago #

    GA now provides reports for page speed (http://analytics.blogspot.com/2011/05/measure-page-load-time-with-site-speed.html)

    As per instructions in the post, in order to enable that feature, we need to push trackPageLoadTime right below the trackPageView call, just like this:


    How can I make the plugin add the line _gaq.push(['_trackPageLoadTime']);?

    I noticed that Yoast GA provides a filter to be used ($push = apply_filters('yoast-ga-push-after-pageview',$push);), which hints for a solution, but I don't know how to make use of it nor couldn't find any examples.

    Any help is appreciated!

  2. Stephen Cronin
    Posted 5 years ago #

    Hi Luciano,

    I'm pretty sure Joost will add it to the plugin in the near future.

    In the meantime, I've written a post (How To Set Up Site Speed For Google Analytics In WordPress) adding how to do it through the custom code setting.

    Be warned however, that this involves hacking the plugin (because it adds slashes to the custom code, which I think is a bug and I'll report separately) - so it should only be used if you are truly desperate! It would be better to wait for an official fix.

    The filter may be a much better solution - but not sure if I have time to work out how to do it.

  3. luciano-passuello
    Posted 5 years ago #

    Thanks, Stephen! That's very helpful.

    Let's wait for Joost's answer on the slashes issue and (hopefully) on how to use the filter as well, so we can avoid any hacking whatsoever in the plugin code... Thanks for the quick reply and the thorough blog post!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by MonsterInsights
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic