1
votes

I have upgraded an existing MVC based applicaiton to Angular 5 application. The avg page load time was 3.5 secounds earlier when it was MVC and still remain almost similar when upgraded to Angular 5. With the Angular 5 application, i can clearly see that the page route happens in blink of second, but the same is not seen in GA report.

I am using google tag manager and am able to see the pageView event sent to GA on every page load. I have followed steps mentioned in : https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

and

Angular 4+ using Google Analytics

My question 1. how is Avg page load time calulated ? Does it count only complete page load - when we refresh the page or only first load ? 2. Should i change any implementation ?

1

1 Answers

1
votes
  • Performance API: if you look at the source code of GA you'll see it's using the Performance API to measure speed

enter image description here

  • Sampling: By default, a fixed 1% sampling of your users make up the data pool from which the page timing metrics are derived, which can be customized with the siteSpeedSampleRate setting of your tracker. On large implementations GA will ignore siteSpeedSampleRate if it means too much data is collected. Effectively on large implementations the sampling rate I see is around 0.8% (looking at # samples / # pageviews).

  • The problem with speed measurement: the problem with modern web apps is that more and more of the content is loaded dynamically from the front end, so it's hard to programatically determine when things are "ready", and this affects all RUM (real-user monitoring) solutions like Google Analytics, Pingdom etc... What you see more and more now are solutions that replicate the loading of the page, and do image analysis to determine when users see the content they should see. Here is an example. So performance API data is a good indicator (eg if it takes 5 secs to establish a connection that's not good) but is fundamentally flawed anyways as far as determining how fast things are as this is a human concept (eg who cares if the footer has not finished loading if users are not interested in it?)

  • Alternative with user timings: so because using RUM solutions is a never-ending headache (your stack changes so it affects speed data, you're never sure whether it truly reflects what users experience), my advise is to measure loading speed of the various pieces of content/UI. There's a feature in Google Analytics called User Timings to do so. Then you can use your analytics to segment and see which pieces of content/UI drive good UX/conversion and measure their performance.