jehna / ga-lite

Small, cacheable and open version of Google Analytics JS client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Report page load times

jehna opened this issue · comments

ga-lite does not currently report page load times.

We could use browser's Navigation Timing API by default.

ga-lite does not currently report page load times.

Does the official? (I really don't know)

The official analytics.js does report page load times, but only 1%-10% of the page loads (1% by default)

Curious if this is on the road map. Tracking user page load times is handy :)

There's no specific roadmap (I'm still the only person contributing to ga-lite) planned, but this feature is a high priority to next releases.

Any contributions to code would be warmly welcome :)

Thanks very much for the update. My coding isn't awesome, but I will see what I can do.

In the meantime, I'm using a custom timing event that uses the browsers navigation timing api and sending that through gal lite as follows inside an onload:

var loadTime = window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart;
galite('send', 'timing', 'pageload', 'load', loadTime);

Would have to figure out how to do this so it goes into the google analytics site speed report section though, which is the bit which is probably somewhat harder.