Hi everyone,
I have worked with many tag management systems but I am new to Launch.
I am trying to capture the best approximation to page load time into an eVar and a numeric event. I have tried some traditional ways of solving it that have worked in other environments. However I am having a hard time to get it to work in Launch.
For example:
a) I am trying to capture a timestamp on "Library Loaded (Page Top)". I am using a Custom Code action step on the same rule that sends the page view beacon:
launchDataLayer.pageLoadStart = Date.now();
b) Then I am capturing another time stamp on "Window Loaded". Once again I am using a custom code on a separate rule firing on Window Loaded.
I am also storing the calculated value in the dataLayer objcet
launchDataLayer.pageLoadEnd = Date.now();
launchDataLayer.pageLoadTime = launchDataLayer.pageLoadEnd - launchDataLayer.pageLoadStart;
c) However when I try to read this value when setting the variables before sending the beacon, it doesn't have any value.
I am pretty sure I am missing something. What am I doing wrong? Is there a better and simple what to accomplish this with Launch?
Thank you in advance for your help!
Jose