Expand my Community achievements bar.

Join us at Adobe Summit 2024 for the Coffee Break Q&A Live series, a unique opportunity to network with and learn from expert users, the Adobe product team, and Adobe partners in a small group, 30 minute AMA conversations.
SOLVED

Negative value for event implemented and page loadtime

Avatar

Level 2

I have tested and debugged the code few times.

I see negative event value for PageLoadTime plugin. Is there any usual bug or missing exception.

Help Appreciated. Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I do not use the plugin....

as far as I understand the code, it looks as if either

a) the implementstion is wrong

b) the plugin doesn't work on specific browsers

basically, the plugin should do 3 things

1) get current user time at execution of plugin

2) get time of request start (on newer browsers) or pageload (custom script)

3) calculate time difference (1-2)

if you got negative values it just means that 2 is greater than 1 or in other words the "current time" is lower than the other timestamp. I have no clue how this might happen but I assume that it might be brwoser specific where the "navigation.requestStart" is not set correctly...

hint: do you have any kind of serviceworker on the webpage

remark: I prefer another solution and manually calculate what business/IT really wants. before implementing the time measurement on our bundles we had a discussion about what points/time differences we really want to measure. after defining the points, we implemented a custom solution using code similar to this blog: https://analyticsdemystified.com/google-analytics/hard-truth-measuring-page-load-time/

View solution in original post

2 Replies

Avatar

Community Advisor

Hello Everyone,

Do anybody facing the same issue? Even i am seeing negative value in Page Load Time Values.

ursbollerGigazelle​ Can help?

I don't think there is gap in our implementation. We followed the link : Measuring Site Speed in Adobe Analytics | Adobe Blog

Thank You

Arun

Avatar

Correct answer by
Community Advisor

I do not use the plugin....

as far as I understand the code, it looks as if either

a) the implementstion is wrong

b) the plugin doesn't work on specific browsers

basically, the plugin should do 3 things

1) get current user time at execution of plugin

2) get time of request start (on newer browsers) or pageload (custom script)

3) calculate time difference (1-2)

if you got negative values it just means that 2 is greater than 1 or in other words the "current time" is lower than the other timestamp. I have no clue how this might happen but I assume that it might be brwoser specific where the "navigation.requestStart" is not set correctly...

hint: do you have any kind of serviceworker on the webpage

remark: I prefer another solution and manually calculate what business/IT really wants. before implementing the time measurement on our bundles we had a discussion about what points/time differences we really want to measure. after defining the points, we implemented a custom solution using code similar to this blog: https://analyticsdemystified.com/google-analytics/hard-truth-measuring-page-load-time/