We have been working on some custom KPI’s in order to track the quantity and quality of the visit.
Unfortunately, we noticed that the average time spent on a page (bucketed) does not include the 1 page pageviews. After some additional research, we found out that AA does not have access to this information since the time on a page is calculated between when somebody arrives on a page and loads the next one. If there is no next one, the time is considered 0.
We would like to accurately track this and saw there are several ways to do this. For instance by installing a counter on the server.
Is there a way to achieve, on the logical discussion we understand that we can have time from when page loads but nothing track on for a time when page exit with any interaction? Basically, the requirement is to track the time between page loads to exit for non-interactive exits of a page or bounce. If anyone has any idea on how this would work, request you to kindly assist us.
Solved! Go to Solution.
Views
Replies
Total Likes
In theory, you could attempt to create custom code to detect when the user is performing an "exit intent" or use of "browser back" button (only when the referrer is something other than your own site)..
A lot of hearbeat trackers do something like this... they fire a heartbeat every X seconds... if the tab or window goes out of focus, they fire a heartbeat, when resumed a new heartbeat is sent, and when the page changes, a final heartbeat for the page is triggered... but most of these systems are designed to take the active engaged time all into consideration (within the session timeout and add them together), Adobe wouldn't have that.. you would need to export all that data into a data lake and come up with all the proper calculations around that... plus, since you pay for every server call... this could easily overwhelm your contract.
You may be better off looking for a third-party heartbeat tracker and using that for your time spent if this is really a concern... or just always provide a caveat on this data that this is merely a calculation between timestamp A and timestamp B and that there will always be a certain amount of loss on the data that can be collected.
In theory, you could attempt to create custom code to detect when the user is performing an "exit intent" or use of "browser back" button (only when the referrer is something other than your own site)..
A lot of hearbeat trackers do something like this... they fire a heartbeat every X seconds... if the tab or window goes out of focus, they fire a heartbeat, when resumed a new heartbeat is sent, and when the page changes, a final heartbeat for the page is triggered... but most of these systems are designed to take the active engaged time all into consideration (within the session timeout and add them together), Adobe wouldn't have that.. you would need to export all that data into a data lake and come up with all the proper calculations around that... plus, since you pay for every server call... this could easily overwhelm your contract.
You may be better off looking for a third-party heartbeat tracker and using that for your time spent if this is really a concern... or just always provide a caveat on this data that this is merely a calculation between timestamp A and timestamp B and that there will always be a certain amount of loss on the data that can be collected.
Almost all browsers support listening for an "unload" event in the browser window. So you could do this:
window.addEventListener("unload", function (e) { // track the time spent with a Custom Link s.tl() beacon });
This implies 2 things:
Also, note that because this happens with the window "unload" event, it is possible that the user's browser could finish unloading/exiting already before your Custom Link beacon has had a chance to be run to completion. As a result, you should expect that you will not be able to get the data of all of your visitors. But I believe you should still be able to get the data for a sizeable number of them.
Also, because of implication #2, your Analytics users may get confused about why there are 2 "Time spent on page" metrics in your report suite now. Furthermore, they will get confused when they see different times spent for each metric, due to the different ways that they're calculated (AA's standard way vs your window "unload" implementation). I suppose you could create a Calculated Metric from this window "unload" time where it is reported only for the segment of bounced visits.
Hope the above helps to guide your thinking on this topic.
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies