Hi @bkrane2 ,
You can add below snippet directly in website head section.
targetPageParams()
window.addEventListener('scroll', function () {
const scrollTop = window.scrollY;
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
const scrollPercent = (scrollTop / docHeight) * 100;
if (scrollPercent > 50 && !window.scrollTracked) {
window.scrollTracked = true;
window.targetPageParams = function () {
return { scrolledHalf: true };
};
}
});
adobe.target.trackEvent()
window.addEventListener('scroll', function () {
const scrollTop = window.scrollY;
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
const scrollPercent = (scrollTop / docHeight) * 100;
if (scrollPercent > 50 && !window.scrollTracked) {
window.scrollTracked = true;
if (typeof adobe !== 'undefined' && adobe.target && adobe.target.trackEvent) {
adobe.target.trackEvent({
mbox: 'scroll-depth',
params: { scrolledHalf: 'true' }
});
}
}
});
You can use attribute value profile.scrolledHalf === "true" later for identify users.
Note: This response is inspired from Generative AI.