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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Negative value for event implemented and page loadtime

analytics101
Level 2
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
ursboller
Correct answer by
Community Advisor
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

0 Replies
PratheepArunRaj
Moderator
Moderator

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

ursboller
Correct answer by
Community Advisor
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