Page Load Time is important metric for user experience and SEO.
Once the page load time is captured in prop/eVar as mentioned in this article:
This will assign the page load time, in tenths of a second, to prop1. For example, if my page took 3.75 seconds to load, I would get a raw value of 38 in the Page Load Time (prop1) report.
So I did it simple by capturing the page load time in seconds.
If you are using the Launch and Extension: Common Analytics Plugins then under page load rule you have to deploy following code and in this case the report will be in sec so no need to divide the result by 10:
// Get Page Load Time
s.prop10 = s._pltLoadTime;
s.prop11 = s._pltPreviousPage;
console.log(“Page Load Time – ” + s.prop10);
console.log(“Prev Page Name – ” + s.prop11);
The getPageLoadTime method does not use any arguments. When calling this method, it does not return anything. Instead, it sets the following variables:
- s._pltPreviousPage : The previous page so you can correlate load time to the previous page
- s._pltLoadTime : The time in seconds that the previous page took to load
The getPageLoadTime plug-in creates two first-party cookies:
- s_plt : The time, in seconds, that the previous page took to load. Expires at the end of the browser session.
- s_pltp The value of the s.pageName variable as recorded in the previous Adobe Analytics image request. Expires at the end of the browser session.
Following is the report which I start getting after this:
This data is not much helpful for the marketer to understand data so it needs to be classified into range. I decided to create a classification for prop1 as shown below:
There are 2 option to classify the data.
- Classification file upload
- Classification rule builder
In classification rule builder we have to use Regx.
Less than 1 Sec : \b(^0|0.[1-9])\b
1-3 Seconds: \b(^1|1.[0-9]|^2|2.[0-9])\b
3-5 Seconds: \b(^3|3.[0-9]|^4|4.[0-9])\b
5-10 Seconds: \b(^5|5.[0-9]|^6|6.[0-9]|^7|7.[0-9]|^8|8.[0-9]|^9|9.[0-9])\b
More than 10 Seconds: [1-9][0-9]
After processing the data in report will look like as shown below:
Note: A single-page application works in the browser and requires no page reloads and no extra time for waiting. The page doesn’t need to be updated since content is downloaded automatically and DOM not generated only once in SPA . So page load time is also generated for only one time.