WordPress.org

Support

Support » Plugins and Hacks » Enabling New Page Speed Measurement

Enabling New Page Speed Measurement

  • 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:

    _gaq.push(['_trackPageview']);
      _gaq.push(['_trackPageLoadTime']);

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Enabling New Page Speed Measurement’ is closed to new replies.