@abtasty/scroll-tracking
Advanced tools
Comparing version 3.0.4 to 3.1.0
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var e=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},n=DATA.engagementGoal;window.checkScrollGoals=function(){var t=100*(document.body.scrollTop||document.documentElement.scrollTop)/(document.body.scrollHeight-window.innerHeight);n.forEach(function(o,s){var i=o.percentage;if(t>=i){var l=o.name;n.splice(s,1),0===n.length&&window.removeEventListener("scroll",window.checkScrollGoals),TEST_ID>0?(window.ABTastyEvent(l,null,TEST_ID),e('Engagement goal "'+l+'" sent to test '+TEST_ID+".")):e("Needs ID of the test.")}})},function(e,n){!function(e){window.ABTastyEventListeners&&(window.ABTastyEventListeners=window.ABTastyEventListeners.filter(function(n){return n.eventName!==e||(window.removeEventListener(n.eventName,n.listener),!1)}))}(e),window.ABTastyEventListeners||(window.ABTastyEventListeners=[]),window.ABTastyEventListeners.push({eventName:e,listener:n}),window.addEventListener(e,n)}("scroll",window.checkScrollGoals)}(); | ||
!function(){"use strict";var e=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];e.unshift("[AB Tasty Widget] "+PACKAGE+":"),console.log.apply(console,e)},n=DATA.engagementGoal,t=function(e){window.ABTastyEventListeners&&(window.ABTastyEventListeners=window.ABTastyEventListeners.filter(function(n){return n.eventName!==e||(window.removeEventListener(n.eventName,n.listener),!1)}))},o=function(){return 100*(document.body.scrollTop||document.documentElement.scrollTop)/(Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight)};window.checkScrollGoals=function(){var t=o();n.forEach(function(o,i){var s=o.percentage;if(t>=s){var c=o.name;n.splice(i,1),0===n.length&&window.removeEventListener("scroll",window.checkScrollGoals),TEST_ID>0?(window.ABTastyEvent(c,null,TEST_ID),e('Engagement goal "'+c+'" sent to test '+TEST_ID+".")):e("Needs ID of the test.")}})},function(e,n){t(e),window.ABTastyEventListeners||(window.ABTastyEventListeners=[]),window.ABTastyEventListeners.push({eventName:e,listener:n}),window.addEventListener(e,n)}("scroll",window.checkScrollGoals)}(); |
{ | ||
"name": "@abtasty/scroll-tracking", | ||
"description": "AB Tasty Widget", | ||
"version": "3.0.4", | ||
"version": "3.1.0", | ||
"icon": "icon.png", | ||
@@ -6,0 +6,0 @@ "form": "dist/form.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5923