Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Any one have the page Scroll Depth Tracking events in current page itself

Avatar

Level 5

Yes, we know the current page Scroll Depth Tracking is present default while we using plugins, but these values are captured on the next page only. But We are required to implement Scroll Depth Tracking for the current page, if the customer is reached a particular percentage then we need to fire the events and need to capture the element values in eVar. We have single-page applications & more dependency on other teams. 

 

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

In Adobe, there is no option to capture the value of the current page scroll depth. However, we can create custom JavaScript code to capture the value for the current page scroll depth.

View solution in original post

5 Replies

Avatar

Correct answer by
Level 2

In Adobe, there is no option to capture the value of the current page scroll depth. However, we can create custom JavaScript code to capture the value for the current page scroll depth.

Avatar

Level 5

Yes, now we have developed a custom script to store the current page scroll tracking values. In case if required the scripts, mail us to share the guide.
We have used below the steps to archive the results.
$(window).on("scroll", function(){
var winheight = $(window).height();
var docheight = $(document).height();
var scrollTop = $(window).scrollTop();
------ // Manual codes
});

$(window).on('beforeunload', function (){
if(ScrollVal <= 25){
//Conditions 1
}else if(ScrollVal > 26 && finalScrollVal <= 50){
//Conditions 2
}else if(ScrollVal > 51 && finalScrollVal <= 75){
//Conditions 3
}else if(ScrollVal > 76){
//Conditions 4
}
return;
});

Avatar

Level 1

Hi, Where do we have to paste the Code, Can We use to Capture 10%, 20%..also?

Avatar

Level 5

You can paste the code in adobe analytics extension custom code place.

yes, we can use 10%, 20% also, but server call gets increased so use as much minimum numbers.

Avatar

Level 2

How can we implement scroll depth through websdk approach ? Where there is no analytics extension we can't even call s object. We have XDM object available where all variables mapped to schema fields.