Maybe this is just a weird interpretation on my part, but is the getPageLoadTime plugin measuring the page load time for the page a user is currently on or the page load time for the previous page a user was on.
https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getpageloadtime.html?l...
I am reading this as the value set for s_plt is the previous page's load time.
The getPageLoadTime method does not use any arguments. When calling this method, it does not return anything. Instead, it sets the following variables:
The getPageLoadTime plug-in creates two first-party cookies:
However, when I run some additional page load time tests the current page I am on reads the same as the value getting sent to s_plt.
Am I reading the plugin correctly, or is the value for s_plt actually the time it takes for the current page a user is on to finish loading?
Solved! Go to Solution.
Views
Replies
Total Likes
I admit that I haven't used this plugin in a long time, but my understanding all along is that it records the page load time of the previous page. So when you set your prop/eVar with the page load time, you also need to set a corresponding prop/eVar with the previous page's name, so that you can pair both of them together to get the correct report.
Also, after reading the plugin's code, I believe this is is how it works:
As you can see in that last step, that's why you're seeing the current page's name in the cookie value, because by then, the plugin has already overwritten the cookies with the current page's data.
Theoretically, that means if you want to set the current page's load time with the current page's Pageview tag, then you could read the cookies directly to set your props/eVars. But you'll need to delay firing your Pageview tag till the Window Loaded event, so that the browser has calculated the load time completely. I haven't tried that myself, but it looks like that could work.
I admit that I haven't used this plugin in a long time, but my understanding all along is that it records the page load time of the previous page. So when you set your prop/eVar with the page load time, you also need to set a corresponding prop/eVar with the previous page's name, so that you can pair both of them together to get the correct report.
Also, after reading the plugin's code, I believe this is is how it works:
As you can see in that last step, that's why you're seeing the current page's name in the cookie value, because by then, the plugin has already overwritten the cookies with the current page's data.
Theoretically, that means if you want to set the current page's load time with the current page's Pageview tag, then you could read the cookies directly to set your props/eVars. But you'll need to delay firing your Pageview tag till the Window Loaded event, so that the browser has calculated the load time completely. I haven't tried that myself, but it looks like that could work.
Views
Likes
Replies