Track Scroll Depth via WebSdk in Adobe Launch | Community
Skip to main content
Level 2
October 22, 2024
Solved

Track Scroll Depth via WebSdk in Adobe Launch

  • October 22, 2024
  • 1 reply
  • 1516 views

Hi team,

 

I want to track how users scroll in the site and wanted to measure different milestones like 25%, 50%, 75% and 100% via WebSdk way not using traditional adobe analytics method where we add clear vars, set variables and send the beacon. Instead I only need to send WebSdk send event when user scroll through these milestones.

 

I don't want to use time and scroll extension because this is not reliable and showing me incorrect results.

 

Is there any javascript code to track the scrolls and how we can call it while sending WebSdk send event.

 

Appreciate if anyone can assist it...

 

Thank you

Best answer by SSampsa

There are plenty of quite well made plugins for scroll tracking on the GA community, for example this one, which is a jQuery plugin: GitHub - robflaherty/scroll-depth: Google Analytics plugin to track visitor scroll depth

 

You can easily fork the code and adjust so it uses Web SDK instead, e.g. directly with alloy: sendEvent | Adobe Data Collection. I would also add a protective functionality to prevent a flood of calls going out if the user scrolls fast or if the page is short, to avoid irrelevant (in my eyes at least) data.

 

1 reply

SSampsa
SSampsaAccepted solution
Level 4
October 22, 2024

There are plenty of quite well made plugins for scroll tracking on the GA community, for example this one, which is a jQuery plugin: GitHub - robflaherty/scroll-depth: Google Analytics plugin to track visitor scroll depth

 

You can easily fork the code and adjust so it uses Web SDK instead, e.g. directly with alloy: sendEvent | Adobe Data Collection. I would also add a protective functionality to prevent a flood of calls going out if the user scrolls fast or if the page is short, to avoid irrelevant (in my eyes at least) data.

 

ish2488Author
Level 2
October 24, 2024

Thank you for the code, although I have found another one which was more compatible with Adobe platform.

Ankit_Chaudhary
Community Advisor
Community Advisor
November 11, 2024

Hi @ish2488 
can you please share the code.