Tracking Time Spent for Users Bouncing From Your Site via Adobe Analytics + Adobe DTM

Each and every analytics solution on the market currently cannot provide the level of visibility to best understand how long end users are spending on a page when they bounce. This is because there isnt a 2nd server call to determine time spent.

However, this posting will provide you with the necessary steps to put this in place.

    What You Will Need:

i) One available event to pass the time spent for correlating with page name captured in an eVar
ii) One available prop or evar to capture the time spent (this will be used for classification to group the times into meaningful buckets)
iii) The ability to add the specific tracking below to your appMeasurement library as this will only work within the library file
iv) To add the getVisitStart plugin to your appMeasurement library as you will need this to determine whether the page viewed is the first in the visit (eligible for tracking bounce time) or not

To get this solution to work, you will need to edit your library file and add the below tracking to the s_code (within the doPlugins section):

//Track Bounce Time of Users
console.log(“Visit Start”+s.visEvent);

if (s.visEvent == “1”) {
var startTime = new Date();

window.onbeforeunload = function(){

var endTime = new Date();
var spentTime = endTime.getTime() – startTime.getTime();
console.log(“Spent Time”+spentTime);

//Adobe Analytics call

s.prop75 = spentTime;
s.eVar75 = s.pageName;”event110=”+spentTime;,’o’,’bounce visit time tracking’);

With this in place, you will be able to see the time spent for those users who bounce after only one page view. You can tweak this to convert the time spent but this is a good start.

Posted in Adobe Analytics, Web Analytics