Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Does getPageLoadTime plugin measure current or previous page load time

Avatar

Avatar
Validate 1
Level 1
talkmntome
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
talkmntome
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
talkmntome
Level 1

27-01-2021

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:

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

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? 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

152 likes

Total Posts

481 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile

Avatar
Springboard
MVP
yuhuisg
MVP

Likes

152 likes

Total Posts

481 posts

Correct Reply

90 solutions
Top badges earned
Springboard
Bedrock
Validate 1
Establish
Contributor
View profile
yuhuisg
MVP

27-01-2021

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:

  • When the page loads:
    • If the 2 cookies are found, then set s._pltPreviousPage and s._pltLoadTime from them. --> so these are the values for the previous page.
  • Calculate the page load time of the current page.
  • Write the 2 cookies with the current page's load time and page name.

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.