Skip to content

Commit 4b99c79

Browse files
committed
Round pixel depth down to nearest 250px increment
1 parent bb2e550 commit 4b99c79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jquery.scrolldepth.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464

6565
function sendEvent(action, label, scrollDistance, timing) {
6666

67+
scrollDistance = Math.floor(scrollDistance/250) * 250;
68+
6769
if (googleTagManager) {
6870

6971
dataLayer.push({'event': 'ScrollDistance', 'eventCategory': 'Scroll Depth', 'eventAction': action, 'eventLabel': label, 'eventValue': 1, 'eventNonInteraction': true});

0 commit comments

Comments
 (0)