From cb968c22c0e5c1fc5d4cbfd541a951540e9f8f4c Mon Sep 17 00:00:00 2001 From: Paul Boocock Date: Fri, 25 Sep 2020 12:11:25 +0100 Subject: [PATCH] 2.4.0-m2 --- sp.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sp.js b/sp.js index 8930edc..85d511e 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.0-m1 + * @version 2.4.0-m2 * @author Alex Dean, Simon Andersson, Anthon Pang, Fred Blundun * @copyright Anthon Pang, Snowplow Analytics Ltd * @license Simplified BSD @@ -31,7 +31,7 @@ w[h]=true}})});f.addEventListener(u,"submit",o(t));u[h]=true}})}}}},{"./lib/help for(y=0;y0){g=c.GlobalSnowplowNamespace.shift();a=c[g];a.q=new h.Snowplow(a.q,g)}else{c._snaq=c._snaq||[];c._snaq=new h.Snowplow(c._snaq,"_snaq")}},{"./snowplow":24}],18:[function(b,c,a){(function(){var n=b("../lib_managed/lodash"),m=b("murmurhash").v3,h=b("jstimezonedetect").jstz.determine(),f=b("browser-cookie-lite"),i=typeof a!=="undefined"?a:this,l=window,d=navigator,j=screen,g=document;i.hasSessionStorage=function(){try{return !!l.sessionStorage }catch(o){return true}};i.hasLocalStorage=function(){try{return !!l.localStorage}catch(o){return true}};i.localStorageAccessible=function(){var o="modernizr";if(!i.hasLocalStorage()){return false}try{l.localStorage.setItem(o,o);l.localStorage.removeItem(o);return true}catch(p){return false}};i.hasCookies=function(o){var p=o||"testcookie";if(n.isUndefined(d.cookieEnabled)){f.cookie(p,"1");return f.cookie(p)==="1"?"1":"0"}return d.cookieEnabled?"1":"0"};i.detectSignature=function(t){var r=[d.userAgent,[j.height,j.width,j.colorDepth].join("x"),(new Date()).getTimezoneOffset(),i.hasSessionStorage(),i.hasLocalStorage()];var o=[];if(d.plugins){for(var s=0;s0){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.0-m1",o={outQueues:[],bufferFlushers:[],expireDateTime:null,hasLoaded:false,registeredOnLoadHandlers:[]}; +}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){for(var F=0;F0){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.0-m2",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){a7=a7.slice(0,a6)}if((a6=a7.lastIndexOf("/"))!==a7.length-1){a7=a7.slice(0,a6+1)}return a7+a5}function ab(a7,a6){var a5=new Date();if(!aR){aT.enqueueRequest(a7.build(),w);z.expireDateTime=a5.getTime()+a6}}function K(a5){return aW+a5+"."+aB}function ad(a5){return g.cookie(K(a5))}function au(){aB=Y((E||aL)+(aX||"/")).slice(0,4)}function aM(){var a5=new Date();ay=a5.getTime()}function aF(){ak();aM()}function ao(){var a5=(ah.compatMode&&ah.compatMode!="BackCompat")?ah.documentElement:ah.body;return[a5.scrollLeft||Z.pageXOffset,a5.scrollTop||Z.pageYOffset]}function at(){var a6=ao();var a5=a6[0];av=a5;am=a5;var a7=a6[1];ai=a7;V=a7}function ak(){var a6=ao();var a5=a6[0];if(a5am){am=a5}}var a7=a6[1];if(a7V){V=a7 -}}}function R(a6){var a5=Math.round(a6);if(!isNaN(a5)){return a5}}function aV(a7,a6,a5,a9,a8){g.cookie(K("id"),a7+"."+a6+"."+a5+"."+a9+"."+a8,H,aX,E)}function aG(){if(!ar){return[]}var a6=new Date(),a5=Math.round(a6.getTime()/1000),a8=ad("id"),a7;if(a8){a7=a8.split(".");a7.unshift("0")}else{if(!af){af=Y((P.userAgent||"")+(P.platform||"")+j.stringify(aO)+a5).slice(0,16)}a7=["1",af,a5,0,a5,""]}return a7}function I(bb){var a7=Math.round(new Date().getTime()/1000),ba=K("id"),a9=K("ses"),bd=ad("ses"),a6=aG(),bc=a6[1],bf=a6[2],a8=a6[3],be=a6[4],a5=a6[5];if(aR&&ar&&S){g.cookie(ba,"",-1,aX,E);g.cookie(a9,"",-1,aX,E);return}if(!bd&&ar){a8++;a5=be}bb.add("vp",p.detectViewport());bb.add("ds",p.detectDocumentSize());bb.add("vid",a8);bb.add("duid",bc);bb.add("fp",x);bb.add("uid",a4);if(az.length){bb.add("refr",aS(az))}bb.add("url",aS(al||aZ));if(ar&&S){aV(bc,bf,a8,a7,a5);g.cookie(a9,"*",L,aX,E)}}function aa(a5){return aJ(a5+".cloudfront.net")}function aJ(a5){if(aD){return("https://"+a5)}else{return("https:"===ah.location.protocol?"https":"http")+"://"+a5 -}}function aU(a5){return a2.concat(a5||[])}function M(){var a7=Z.performance||Z.mozPerformance||Z.msPerformance||Z.webkitPerformance;if(a7){var a6={};for(var a5 in a7.timing){if(!r.isFunction(a7.timing[a5])){a6[a5]=a7.timing[a5]}}delete a6.requestEnd;if(Z.chrome&&Z.chrome.loadTimes&&typeof Z.chrome.loadTimes().firstPaintTime==="number"){a6.chromeFirstPaint=Math.round(Z.chrome.loadTimes().firstPaintTime*1000)}return{schema:"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",data:a6}}}function aY(){if(!aH&&P.geolocation&&P.geolocation.getCurrentPosition){aH=true;navigator.geolocation.getCurrentPosition(function(a5){var a7=a5.coords;var a6={schema:"iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0",data:{latitude:a7.latitude,longitude:a7.longitude,latitudeLongitudeAccuracy:a7.accuracy,altitude:a7.altitude,altitudeAccuracy:a7.altitudeAccuracy,bearing:a7.heading,speed:a7.speed,timestamp:a5.timestamp}};a2.push(a6)})}}function D(){var a5={};r.forEach(["__utma","__utmb","__utmc","__utmv","__utmz","_ga"],function(a6){var a7=g.cookie(a6); -if(a7){a5[a6]=a7}});return{schema:"iglu:com.google.analytics/cookies/jsonschema/1-0-0",data:a5}}function aq(a9,a6){var a8=f.fixupTitle(a9||W);y.trackPageView(aS(al||aZ),a8,aS(az),aU(a6));var a5=new Date();if(B&&O&&!aA){aA=true;at();f.addEventListener(ah,"click",aM);f.addEventListener(ah,"mouseup",aM);f.addEventListener(ah,"mousedown",aM);f.addEventListener(ah,"mousemove",aM);f.addEventListener(ah,"mousewheel",aM);f.addEventListener(Z,"DOMMouseScroll",aM);f.addEventListener(Z,"scroll",aF);f.addEventListener(ah,"keypress",aM);f.addEventListener(ah,"keydown",aM);f.addEventListener(ah,"keyup",aM);f.addEventListener(Z,"resize",aM);f.addEventListener(Z,"focus",aM);f.addEventListener(Z,"blur",aM);ay=a5.getTime();setInterval(function a7(){var ba=new Date();if((ay+O)>ba.getTime()){if(B=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];if(a7an){an=a7}}var a9=a8[1];if(a9V){V=a9}}}function R(a8){var a7=Math.round(a8);if(!isNaN(a7)){return a7}}function aW(a9,a8,a7,bb,ba){g.cookie(K("id"),a9+"."+a8+"."+a7+"."+bb+"."+ba,H,aY,E)}function aH(){if(!at){return[]}var a8=new Date(),a7=Math.round(a8.getTime()/1000),ba=ae("id"),a9;if(ba){a9=ba.split(".");a9.unshift("0")}else{if(!ag){ag=Y((P.userAgent||"")+(P.platform||"")+j.stringify(aP)+a7).slice(0,16)}a9=["1",ag,a7,0,a7,""]}return a9}function I(bd){var a9=Math.round(new Date().getTime()/1000),bc=K("id"),bb=K("ses"),bf=ae("ses"),a8=aH(),be=a8[1],bh=a8[2],ba=a8[3],bg=a8[4],a7=a8[5];if(aS&&at&&S){g.cookie(bc,"",-1,aY,E);g.cookie(bb,"",-1,aY,E);return}if(!bf&&at){ba++;a7=bg}bd.add("vp",p.detectViewport());bd.add("ds",p.detectDocumentSize());bd.add("vid",ba);bd.add("duid",be);bd.add("fp",x);bd.add("uid",a6);a5();bd.add("refr",aT(ac||aA));bd.add("url",aT(am||a0));if(at&&S){aW(be,bh,ba,a9,a7); +g.cookie(bb,"*",L,aY,E)}}function aa(a7){return aK(a7+".cloudfront.net")}function aK(a7){if(aE){return("https://"+a7)}else{return("https:"===ai.location.protocol?"https":"http")+"://"+a7}}function aV(a7){return a3.concat(a7||[])}function M(){var a9=Z.performance||Z.mozPerformance||Z.msPerformance||Z.webkitPerformance;if(a9){var a8={};for(var a7 in a9.timing){if(!r.isFunction(a9.timing[a7])){a8[a7]=a9.timing[a7]}}delete a8.requestEnd;if(Z.chrome&&Z.chrome.loadTimes&&typeof Z.chrome.loadTimes().firstPaintTime==="number"){a8.chromeFirstPaint=Math.round(Z.chrome.loadTimes().firstPaintTime*1000)}return{schema:"iglu:org.w3/PerformanceTiming/jsonschema/1-0-0",data:a8}}}function aZ(){if(!aI&&P.geolocation&&P.geolocation.getCurrentPosition){aI=true;navigator.geolocation.getCurrentPosition(function(a7){var a9=a7.coords;var a8={schema:"iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0",data:{latitude:a9.latitude,longitude:a9.longitude,latitudeLongitudeAccuracy:a9.accuracy,altitude:a9.altitude,altitudeAccuracy:a9.altitudeAccuracy,bearing:a9.heading,speed:a9.speed,timestamp:a7.timestamp}}; +a3.push(a8)})}}function D(){var a7={};r.forEach(["__utma","__utmb","__utmc","__utmv","__utmz","_ga"],function(a8){var a9=g.cookie(a8);if(a9){a7[a8]=a9}});return{schema:"iglu:com.google.analytics/cookies/jsonschema/1-0-0",data:a7}}function ar(bb,a8){var ba=f.fixupTitle(bb||W);a5();y.trackPageView(aT(am||a0),ba,aT(ac||aA),aV(a8));var a7=new Date();if(B&&O&&!aB){aB=true;au();f.addEventListener(ai,"click",aN);f.addEventListener(ai,"mouseup",aN);f.addEventListener(ai,"mousedown",aN);f.addEventListener(ai,"mousemove",aN);f.addEventListener(ai,"mousewheel",aN);f.addEventListener(Z,"DOMMouseScroll",aN);f.addEventListener(Z,"scroll",aG);f.addEventListener(ai,"keypress",aN);f.addEventListener(ai,"keydown",aN);f.addEventListener(ai,"keyup",aN);f.addEventListener(Z,"resize",aN);f.addEventListener(Z,"focus",aN);f.addEventListener(Z,"blur",aN);az=a7.getTime();setInterval(function a9(){var bc=new Date();if((az+O)>bc.getTime()){if(B