We’re using the window.onLoad event to trigger our window.performance.timing.* collection beacon, and that’s been working really well for us.
We’re venturing into deeper territory for our RUM data to capture details from the window.performance.getEntries().* interface. To date, we’ve done this with an offset beyond the loadEventEnd. However, we want to get a more complete view of resources delivered to our customers, so we also want to fire a beacon on the unLoad event for the page.
I understand that doing “first-view-only” tests wouldn’t trigger this behavior. However, I’ve run a couple of samples with the repeat first and second view option enabled and I’m not seeing the request triggered.
Is that expected behavior?
Yes, the repeat view tests are done by closing the browser and re-launching it without clearing the cache. You need to use the scripting support to trigger a multi-step navigation to see it.
ahh… that makes sense. I’ll give that a shot.
The closing of the browser window (which happens in “first-view-only” tests, too) should also trigger the onunload event, shouldn’t it? I’m using beforeunload myself, but haven’t gotten it to work with Firefox just yet…
You’re completely right, Rob.
However, it looks like something isn’t executing in our scripts accurately. So, we aren’t getting it in either case.
looks to have been a problem with the minify service we were utilizing.
It decided to combine some logic into an if statement rather than executing it if the conditions were met, so the request wouldn’t fire. Now, we’re getting it when the session closes. Exactly what we expected!