Pankaj - PK
Pankaj - PK

Reputation: 43

Implement scroll based events in DTM

I am struggling with implementing scroll event in DTM. I know we can do it using enter vieport option on div but I do not want to implement it that way. I would like to use window.scroll functions (preferably).

Any pointers would be helpful.

Thanks Pankaj

Upvotes: 1

Views: 839

Answers (1)

Jakub Otrząsek
Jakub Otrząsek

Reputation: 66

You should start with page load rule where you can paste custom js script.

Like:

if(jQuery(window).scrollTop() + jQuery(window).height() > jQuery(document).height() - .50*jQuery(document).height()) {
 if (passed <50) {  
 passed+=25;
 _satellite.track('Scroll50'); 

 }
 }

then you can prepare direct call rule with string: Scroll50 and you are ready to setup analytics.

Hope it helps.

Upvotes: 1

Related Questions