Use User scroll depth tracking for target segmentation | Community
Skip to main content
Level 2
May 14, 2024
Solved

Use User scroll depth tracking for target segmentation

  • May 14, 2024
  • 2 replies
  • 902 views

Hi Adobe Community,

 

I am currently exploring the popup custom code in Adobe Target. It will be perfect if we can define the segmentation by scroll depth, for example only users who scrolled half of the page will see the popup.

Is there any advisable ways to implement the scroll depth tracking? 

 

Thanks!

 

Popup reference: https://experienceleague.adobe.com/en/docs/target/using/experiences/vec/modifications/experience-templates

Best answer by Gokul_Agiwal

Hi @chrisch4 

Yes you can certainly define segmentation based on scroll depth. Not sure how your target setup implemented in your project but the suggestion would be to use function called adobe.target.trackEvent on scroll event. 

 

Something like this below -

adobe.target.trackEvent({ "mbox": "scroll", "params": { "scrolldepthPercentage": "value", (Pass 25%, 50%, 75%, & 100%) "pageName": "value" } });

 

In case if you need scrolldepthPercentage param to be available under visitorProfile for audience creation then you can add prefix like below 

adobe.target.trackEvent({ "mbox": "scroll", "params": { "profile.scrolldepthPercentage": "value", (Pass 25%, 50%, 75%, & 100%) "profile.pageName": "value" } });

Hope this helps. 

Thanks 

2 replies

Gokul_Agiwal
Community Advisor
Gokul_AgiwalCommunity AdvisorAccepted solution
Community Advisor
May 14, 2024

Hi @chrisch4 

Yes you can certainly define segmentation based on scroll depth. Not sure how your target setup implemented in your project but the suggestion would be to use function called adobe.target.trackEvent on scroll event. 

 

Something like this below -

adobe.target.trackEvent({ "mbox": "scroll", "params": { "scrolldepthPercentage": "value", (Pass 25%, 50%, 75%, & 100%) "pageName": "value" } });

 

In case if you need scrolldepthPercentage param to be available under visitorProfile for audience creation then you can add prefix like below 

adobe.target.trackEvent({ "mbox": "scroll", "params": { "profile.scrolldepthPercentage": "value", (Pass 25%, 50%, 75%, & 100%) "profile.pageName": "value" } });

Hope this helps. 

Thanks 

Level 4
May 17, 2024

Hi Chirs,

What is the purpose you would like to try this pop-up using Audience segmentations?

Generally segmentation will work in the initial page load. Even though if you capture the scroll depth half of the way it will deliver only at the next page load or next visit(profile parameter).

If you want to achieve the same flow then you need to write this logic in the custom JavaScript.

Thanks

Karuppiah Sakthivel