diff --git a/sp.js b/sp.js index 23de522..937fef4 100644 --- a/sp.js +++ b/sp.js @@ -1,7 +1,7 @@ /*! * Snowplow - The world's most powerful web analytics platform * * @description JavaScript tracker for Snowplow - * @version 2.4.1-m3 + * @version 2.4.1-m4 * @author Alex Dean, Simon Andersson, Anthon Pang, Fred Blundun * @copyright Anthon Pang, Snowplow Analytics Ltd * @license Simplified BSD @@ -51,8 +51,8 @@ var ak={top:"if (!objectTypes[typeof iterable]) return result;\n"+aK.top,array:f A.forOwn=Y;A.keys=J;A.map=x;A.mapValues=ah;A.property=aq;A.collect=x;A.each=ax;A.extend=aC;A.select=D;A.clone=B;A.find=aR;A.identity=T;A.isArguments=g;A.isArray=f;A.isDate=m;A.isEmpty=p;A.isFunction=aA;A.isNull=aQ;A.isObject=E;A.isString=aJ;A.isUndefined=M;A.noop=aw;A.detect=aR;A.findWhere=aR;A.VERSION="2.4.1";if(v&&N){if(aN){(N.exports=A)._=A}}}.call(this))}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],22:[function(c,d,a){var g=c("./lib_managed/lodash"),f=c("./lib/helpers"),b=typeof a!=="undefined"?a:this;b.getLinkTrackingManager=function(p,j,s){var i,h,o,t,n,q;function u(x,w){var E,G,C,D,B,F;while((E=x.parentNode)!==null&&!g.isUndefined(E)&&((G=x.tagName.toUpperCase())!=="A"&&G!=="AREA")){x=E}if(!g.isUndefined(x.href)){var A=x.hostname||f.getHostName(x.href),y=A.toLowerCase(),v=x.href.replace(A,y),z=new RegExp("^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):","i");if(!z.test(v)){C=x.id;D=g.map(x.classList);B=x.target;F=o?x.innerHTML:null; v=unescape(v);p.trackLinkClick(v,C,D,B,F,s(w))}}}function r(v){return function(w){var x,y;w=w||window.event;x=w.which||w.button;y=w.target||w.srcElement;if(w.type==="click"){if(y){u(y,v)}}else{if(w.type==="mousedown"){if((x===1||x===2)&&y){n=x;q=y}else{n=q=null}}else{if(w.type==="mouseup"){if(x===n&&y===q){u(y,v)}n=q=null}}}}}function m(v){if(h){f.addEventListener(v,"mouseup",r(t),false);f.addEventListener(v,"mousedown",r(t),false)}else{f.addEventListener(v,"click",r(t),false)}}function l(w,y){var v=g.map(w.classList),x;for(x=0;x1){s.bufferFlushers.push(function(){if(!o){q()}})}function x(E){var A="?",B={co:true,cx:true},z=true;for(var D in E){if(E.hasOwnProperty(D)&&!(B.hasOwnProperty(D))){if(!z){A+="&"}else{z=false}A+=encodeURIComponent(D)+"="+encodeURIComponent(E[D])}}for(var C in B){if(E.hasOwnProperty(C)&&B.hasOwnProperty(C)){A+="&"+C+"="+encodeURIComponent(E[C])}}return A}function p(z){return h.mapValues(z,function(A){return A.toString()})}function v(A,z){r.push(j?p(A):x(A));i=z+y;if(f()&&w){localStorage.setItem(m,g.stringify(r))}if(!o&&r.length>=l){q()}}function q(){while(r.length&&typeof r[0]!=="string"&&typeof r[0]!=="object"){r.shift()}if(r.length<1){o=false; -return}if(!h.isString(i)){throw"No Snowplow collector configured, cannot track"}o=true;var D=r[0];if(j){var E=new XMLHttpRequest();E.open("POST",i,true);E.withCredentials=true;var z=setTimeout(function(){E.abort();o=false},5000);var C=r.length;E.onreadystatechange=function(){if(E.readyState===4&&E.status>=200&&E.status<400){for(var F=0;F=400){o=false}}};E.setRequestHeader("Content-Type","application/json; charset=UTF-8");var A={schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-2",data:r};if(r.length>0){E.send(g.stringify(A))}}else{var B=new Image(1,1);B.onload=function(){r.shift();if(f()&&w){localStorage.setItem(m,g.stringify(r))}q()};B.onerror=function(){o=false};B.src=i+D}}return{enqueueRequest:v,executeQueue:q}}}())},{"./lib/detectors":18,"./lib_managed/lodash":21,JSON:1}],24:[function(b,c,a){(function(){var i=b("./lib_managed/lodash"),h=b("./lib/helpers"),d=b("./in_queue"),g=b("./tracker"),f=typeof a!=="undefined"?a:this; -f.Snowplow=function(m,r){var l=document,n=window,p="js-2.4.1-m3",o={outQueues:[],bufferFlushers:[],expireDateTime:null,hasLoaded:false,registeredOnLoadHandlers:[]};function q(){var t;i.forEach(o.bufferFlushers,function(u){u()});if(o.expireDateTime){do{t=new Date();if(i.filter(o.outQueues,function(u){return u.length>0}).length===0){break}}while(t.getTime()=200&&E.status<400){for(var F=0;F=400){clearTimeout(z);o=false}}};E.setRequestHeader("Content-Type","application/json; charset=UTF-8");var A={schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-2",data:r};if(r.length>0){E.send(g.stringify(A))}}else{var B=new Image(1,1);B.onload=function(){r.shift();if(f()&&w){localStorage.setItem(m,g.stringify(r))}q()};B.onerror=function(){o=false};B.src=i+D}}return{enqueueRequest:v,executeQueue:q}}}())},{"./lib/detectors":18,"./lib_managed/lodash":21,JSON:1}],24:[function(b,c,a){(function(){var i=b("./lib_managed/lodash"),h=b("./lib/helpers"),d=b("./in_queue"),g=b("./tracker"),f=typeof a!=="undefined"?a:this; +f.Snowplow=function(m,r){var l=document,n=window,p="js-2.4.1-m4",o={outQueues:[],bufferFlushers:[],expireDateTime:null,hasLoaded:false,registeredOnLoadHandlers:[]};function q(){var t;i.forEach(o.bufferFlushers,function(u){u()});if(o.expireDateTime){do{t=new Date();if(i.filter(o.outQueues,function(u){return u.length>0}).length===0){break}}while(t.getTime()=0){a9=a9.slice(0,a8)}if((a8=a9.lastIndexOf("/"))!==a9.length-1){a9=a9.slice(0,a8+1)}return a9+a7}function ab(a9,a8){var a7=new Date();if(!aS){aU.enqueueRequest(a9.build(),w);z.expireDateTime=a7.getTime()+a8}}function K(a7){return aX+a7+"."+aC}function ae(a7){return g.cookie(K(a7))}function av(){a5();aC=Y((E||aM)+(aY||"/")).slice(0,4)}function aN(){var a7=new Date();az=a7.getTime()}function aG(){al();aN()}function ap(){var a7=(ai.compatMode&&ai.compatMode!="BackCompat")?ai.documentElement:ai.body;return[a7.scrollLeft||Z.pageXOffset,a7.scrollTop||Z.pageYOffset]}function au(){var a8=ap();var a7=a8[0];aw=a7;an=a7;var a9=a8[1];aj=a9;V=a9}function al(){var a8=ap();var a7=a8[0];