Negative value for event implemented and page loadtime | Community
Skip to main content
analytics101
Level 2
August 29, 2018
Solved

Negative value for event implemented and page loadtime

  • August 29, 2018
  • 2 replies
  • 1800 views

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

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 Urs_Boller

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/

2 replies

PratheepArunRaj
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 16, 2019

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

Thank You, Pratheep Arun Raj B (Arun) | Xerago | Terryn Winter Analytics
Urs_Boller
Community Advisor
Urs_BollerCommunity AdvisorAccepted solution
Community Advisor
January 16, 2019

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/