Page load time plugin not working | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hemang35

Hello,

Based on the link you provided, I see that you are using the getPageLoadTime plugin in Adobe Analytics. This plugin is designed to capture the page load time for each of your site's pages.

The getPageLoadTime function needs to be called on each page load, and it uses the two variables you mentioned (window._pltPreviousPage, window._pltLoadTime) to calculate the load time.

If the function is not being called or the variables are not being set.

1 reply

Hemang35
Hemang35Accepted solution
Level 5
May 30, 2023

Hello,

Based on the link you provided, I see that you are using the getPageLoadTime plugin in Adobe Analytics. This plugin is designed to capture the page load time for each of your site's pages.

The getPageLoadTime function needs to be called on each page load, and it uses the two variables you mentioned (window._pltPreviousPage, window._pltLoadTime) to calculate the load time.

If the function is not being called or the variables are not being set.

DineshRkumar
Level 3
May 31, 2023

https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getpageloadtime.html?l...

 

As mentioned in the above link, I am using the same to call the getPageLoadTime() method. 

 

if(s.pageName) getPageLoadTime();
if(window._pltPreviousPage)
{
  s.prop10 = window._pltLoadTime;
  s.eVar10 = window._pltPreviousPage
  s.events = "event100=" + window._pltLoadTime;
}

getPageLoadTime() - method is throwing error. I think there must be some other way to call the same. I tried s.getPageLoadTime() or this.getPageLoadTime() .. still error is throwing ..  Undefined is the error.

 

Hemang35
Level 5
June 2, 2023

The error message "Undefined" usually means that the JavaScript interpreter is unable to locate the function or variable you're referring to, in this case getPageLoadTime(). In Adobe Analytics, getPageLoadTime() is not a built-in method but is instead a custom function defined by the user, typically within a custom JavaScript plugin.

Based on the context you've provided, it seems that you're referring to the getPageLoadTime() function as defined in the Adobe Experience League documentation here https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getpageloadtime.html?lang=en.

In this case, you need to ensure that you've defined this function somewhere in your Adobe Analytics JavaScript implementation before you attempt to call it. The function looks something like this:

 

function getPageLoadTime() { // This function calculates the page load time // and sets the relevant variables. //... }

 

However, if you've already defined this function and are still seeing the "Undefined" error, it's possible that there's a scope issue. You may need to define the function in a scope that's accessible to the code where you're trying to call it.

Finally, you could also try console logging to check if your function is defined correctly:

console.log(getPageLoadTime);

If the function is defined properly, this should log the function definition to the console. If it logs "undefined", then the function hasn't been defined properly or is out of scope.