/*! * @preserve * jquery.scrolldepth.js | v0.8 * Copyright (c) 2015 Rob Flaherty (@robflaherty) * Licensed under the MIT and GPL licenses. */ !function(e,n,t){use strict;var r,o,a,l,i={minHeight0,elements[],percentage!0,userTiming!0,pixelDepth!0,nonInteraction!0,gaGlobal!1,gtmOverride!1},c=e(n),u=[],g=0;e.scrollDepth=function(h){function p(e){ll({eventScrollDistance,eventCategoryScroll Depth,eventActione,eventLabelBaseline,eventValue1,eventNonInteraction!0})(r&&n[a](send,event,Scroll Depth,e,Baseline,1,{nonInteraction!0}),o&&_gaq.push([_trackEvent,Scroll Depth,e,Baseline,1,!0]))}function s(e,t,i,c){l(l({eventScrollDistance,eventCategoryScroll Depth,eventActione,eventLabelt,eventValue1,eventNonInteractionh.nonInteraction}),h.pixelDepth&&arguments.length2&&ig&&(g=i,l({eventScrollDistance,eventCategoryScroll Depth,eventActionPixel Depth,eventLabelD(i),eventValue1,eventNonInteractionh.nonInteraction})),h.userTiming&&arguments.length3&&l({eventScrollTiming,eventCategoryScroll Depth,eventActione,eventLabelt,eventTimingc}))(r&&(n[a](send,event,Scroll Depth,e,t,1,{nonInteractionh.nonInteraction}),h.pixelDepth&&arguments.length2&&ig&&(g=i,n[a](send,event,Scroll Depth,Pixel Depth,D(i),1,{nonInteractionh.nonInteraction})),h.userTiming&&arguments.length3&&n[a](send,timing,Scroll Depth,e,c,t)),o&&(_gaq.push([_trackEvent,Scroll Depth,e,t,1,h.nonInteraction]),h.pixelDepth&&arguments.length2&&ig&&(g=i,_gaq.push([_trackEvent,Scroll Depth,Pixel Depth,D(i),1,h.nonInteraction])),h.userTiming&&arguments.length3&&_gaq.push([_trackTiming,Scroll Depth,e,c,t,100])))}function v(e){return{25%parseInt(.25e,10),50%parseInt(.5e,10),75%parseInt(.75e,10),100%e-5}}function f(n,t,r){e.each(n,function(n,o){-1===e.inArray(n,u)&&t=o&&(s(Percentage,n,t,r),u.push(n))})}function m(n,t,r){e.each(n,function(n,o){-1===e.inArray(o,u)&&e(o).length&&t=e(o).offset().top&&(s(Elements,o,t,r),u.push(o))})}function D(e){return(250Math.floor(e250)).toString()}function d(e,n){var t,r,o,a=null,l=0,i=function(){l=new Date,a=null,o=e.apply(t,r)};return function(){var c=new Date;l(l=c);var u=n-(c-l);return t=this,r=arguments,0=u(clearTimeout(a),a=null,l=c,o=e.apply(t,r))a(a=setTimeout(i,u)),o}}var y=+new Date;h=e.extend({},i,h),e(t).height()h.minHeight(h.gaGlobal(r=!0,a=h.gaGlobal)function==typeof ga(r=!0,a=ga)function==typeof __gaTracker&&(r=!0,a=__gaTracker),undefined!=typeof _gaq&&function==typeof _gaq.push&&(o=!0),function==typeof h.eventHandlerl=h.eventHandlerundefined==typeof dataLayerfunction!=typeof dataLayer.pushh.gtmOverride(l=function(e){dataLayer.push(e)}),h.percentagep(Percentage)h.elements&&p(Elements),c.on(scroll.scrollDepth,d(function(){var r=e(t).height(),o=n.innerHeightn.innerHeightc.height(),a=c.scrollTop()+o,l=v(r),i=+new Date-y;return u.length=4+h.elements.lengthvoid c.off(scroll.scrollDepth)(h.elements&&m(h.elements,a,i),void(h.percentage&&f(l,a,i)))},500)))}}(jQuery,window,document);