Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@snowplow/browser-tracker

Package Overview
Dependencies
Maintainers
3
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker - npm Package Compare versions

Comparing version 3.24.2 to 3.24.3

2

dist/index.module.js
/*!
* Browser tracker for Snowplow v3.24.2 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.24.3 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause

/*!
* Browser tracker for Snowplow v3.24.2 (http://bit.ly/sp-js)
* Browser tracker for Snowplow v3.24.3 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -75,20 +75,21 @@ * Licensed under BSD-3-Clause

function m(){f.removeEventListener("DOMContentLoaded",m,!1);b()}):f.attachEvent&&f.attachEvent("onreadystatechange",function t(){"complete"===f.readyState&&(f.detachEvent("onreadystatechange",t),b())});Ea(g,"load",b,!1)}var e=new Ed,f=document,g=window;f.visibilityState&&Ea(f,"visibilitychange",a,!1);Ea(g,"beforeunload",function(){e.bufferFlushers.forEach(function(h){h(!1)})},!1);"loading"===document.readyState?c():b();return e}var Q=function(){Q=Object.assign||function(a){for(var b,c=1,e=arguments.length;c<
e;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a};return Q.apply(this,arguments)},ta={},Nc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Nc){var Oc=new Uint8Array(16);ta=function(){Nc(Oc);return Oc}}else{var Pc=Array(16);ta=function(){for(var a=0,b;16>a;a++)0===(a&3)&&(b=4294967296*
Math.random()),Pc[a]=b>>>((a&3)<<3)&255;return Pc}}for(var N=[],sb=0;256>sb;++sb)N[sb]=(sb+256).toString(16).substr(1);var Qc=function(a,b){b=b||0;return[N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]]].join("")},Fd=ta,Rc,dc,ec=0,fc=0,Gd=ta;ta=function(a,b,c){c=b&&c||0;"string"==typeof a&&(b="binary"===a?Array(16):null,a=null);a=a||{};a=a.random||(a.rng||Gd)();a[6]=a[6]&
15|64;a[8]=a[8]&63|128;if(b)for(var e=0;16>e;++e)b[c+e]=a[e];return b||Qc(a)};ta.v1=function(a,b,c){c=b&&c||0;var e=b||[];a=a||{};var f=a.node||Rc,g=void 0!==a.clockseq?a.clockseq:dc;if(null==f||null==g){var h=Fd();null==f&&(f=Rc=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]);null==g&&(g=dc=(h[6]<<8|h[7])&16383)}h=void 0!==a.msecs?a.msecs:(new Date).getTime();var m=void 0!==a.nsecs?a.nsecs:fc+1,t=h-ec+(m-fc)/1E4;0>t&&void 0===a.clockseq&&(g=g+1&16383);(0>t||h>ec)&&void 0===a.nsecs&&(m=0);if(1E4<=m)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");
ec=h;fc=m;dc=g;h+=122192928E5;a=(1E4*(h&268435455)+m)%4294967296;e[c++]=a>>>24&255;e[c++]=a>>>16&255;e[c++]=a>>>8&255;e[c++]=a&255;a=h/4294967296*1E4&268435455;e[c++]=a>>>8&255;e[c++]=a&255;e[c++]=a>>>24&15|16;e[c++]=a>>>16&255;e[c++]=g>>>8|128;e[c++]=g&255;for(g=0;6>g;++g)e[c+g]=f[g];return b?b:Qc(e)};var ja=ta.v4=ta,oa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",na;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(na||
(na={}));var Y=function(a){void 0===a&&(a=na.warn);return{setLogLevel:function(b){a=na[b]?b:na.warn},warn:function(b,c){for(var e=[],f=2;f<arguments.length;f++)e[f-2]=arguments[f];a>=na.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,T([f+"\n",c],e,!1)):console.warn.apply(console,T([f],e,!1)))},error:function(b,c){for(var e=[],f=2;f<arguments.length;f++)e[f-2]=arguments[f];a>=na.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,
T([f+"\n",c],e,!1)):console.error.apply(console,T([f],e,!1)))},debug:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=na.debug&&"undefined"!==typeof console&&console.debug.apply(console,T(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=na.info&&"undefined"!==typeof console&&console.info.apply(console,T(["Snowplow: "+b],c,!1))}}}(),Sc={},Tc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b,
c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor==Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360;for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],e=0,f=0;e<b.length;e++,f+=8)c[f>>>5]|=b[e]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],e=0;e<32*b.length;e+=8)c.push(b[e>>>5]>>>24-e%32&255);return c},bytesToHex:function(b){for(var c=
[],e=0;e<b.length;e++)c.push((b[e]>>>4).toString(16)),c.push((b[e]&15).toString(16));return c.join("")},hexToBytes:function(b){for(var c=[],e=0;e<b.length;e+=2)c.push(parseInt(b.substr(e,2),16));return c},bytesToBase64:function(b){for(var c=[],e=0;e<b.length;e+=3)for(var f=b[e]<<16|b[e+1]<<8|b[e+2],g=0;4>g;g++)8*e+6*g<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-g)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig,
"");for(var c=[],e=0,f=0;e<b.length;f=++e%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(e-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(e))>>>6-2*f);return c}};Tc=a})();var gc={utf8:{stringToBytes:function(a){return gc.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(gc.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=
[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},Uc=gc;(function(){var a=Tc,b=Uc.utf8,c=Uc.bin,e=function(f,g){var h=a.wordsToBytes,m=f;m.constructor==String?m=b.stringToBytes(m):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||(m=m.toString());f=a.bytesToWords(m);var t=8*m.length;m=[];var q=
1732584193,z=-271733879,w=-1732584194,r=271733878,k=-1009589776;f[t>>5]|=128<<24-t%32;f[(t+64>>>9<<4)+15]=t;for(t=0;t<f.length;t+=16){for(var A=q,L=z,P=w,H=r,I=k,G=0;80>G;G++){if(16>G)m[G]=f[t+G];else{var ea=m[G-3]^m[G-8]^m[G-14]^m[G-16];m[G]=ea<<1|ea>>>31}ea=(q<<5|q>>>27)+k+(m[G]>>>0)+(20>G?(z&w|~z&r)+1518500249:40>G?(z^w^r)+1859775393:60>G?(z&w|z&r|w&r)-1894007588:(z^w^r)-899497514);k=r;r=w;w=z<<30|z>>>2;z=q;q=ea}q+=A;z+=L;w+=P;r+=H;k+=I}h=h.call(a,[q,z,w,r,k]);return g&&g.asBytes?h:g&&g.asString?
c.bytesToString(h):a.bytesToHex(h)};e._blocksize=16;e._digestsize=20;Sc=e})();var sd=Sc,jd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},yc=!1,gb,Va="x",Ya={},Ed=function(){return function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Vc="undefined"!==typeof window?Dd():void 0;x.addGlobalContexts=function(a,b){D(b,function(c){c.core.addGlobalContexts(a)})};x.addPlugin=function(a,b){D(b,function(c){c.addPlugin(a)})};x.clearGlobalContexts=
function(a){D(a,function(b){b.core.clearGlobalContexts()})};x.clearUserData=function(a,b){D(b,function(c){c.clearUserData(a)})};x.crossDomainLinker=function(a,b){D(b,function(c){c.crossDomainLinker(a)})};x.disableActivityTracking=function(a){D(a,function(b){b.disableActivityTracking()})};x.disableActivityTrackingCallback=function(a){D(a,function(b){b.disableActivityTrackingCallback()})};x.disableAnonymousTracking=function(a,b){D(b,function(c){c.disableAnonymousTracking(a)})};x.discardBrace=function(a,
b){D(b,function(c){c.discardBrace(a)})};x.discardHashTag=function(a,b){D(b,function(c){c.discardHashTag(a)})};x.enableActivityTracking=function(a,b){D(b,function(c){c.enableActivityTracking(a)})};x.enableActivityTrackingCallback=function(a,b){D(b,function(c){c.enableActivityTrackingCallback(a)})};x.enableAnonymousTracking=function(a,b){D(b,function(c){c.enableAnonymousTracking(a)})};x.flushBuffer=function(a,b){D(b,function(c){c.flushBuffer(a)})};x.newSession=function(a){D(a,function(b){b.newSession()})};
x.newTracker=function(a,b,c){void 0===c&&(c={});if(Vc){var e="js-".concat("3.24.2");Ya.hasOwnProperty(a)?a=null:(Ya[a]=pd(a,a,e,b,Vc,c),a=Ya[a]);return a}};x.preservePageViewId=function(a){D(a,function(b){b.preservePageViewId()})};x.removeGlobalContexts=function(a,b){D(b,function(c){c.core.removeGlobalContexts(a)})};x.setBufferSize=function(a,b){D(b,function(c){c.setBufferSize(a)})};x.setCollectorUrl=function(a,b){D(b,function(c){c.setCollectorUrl(a)})};x.setCookiePath=function(a,b){D(b,function(c){c.setCookiePath(a)})};
x.setCustomUrl=function(a,b){D(b,function(c){c.setCustomUrl(a)})};x.setDocumentTitle=function(a,b){D(b,function(c){c.setDocumentTitle(a)})};x.setOptOutCookie=function(a,b){D(b,function(c){c.setOptOutCookie(a)})};x.setReferrerUrl=function(a,b){D(b,function(c){c.setReferrerUrl(a)})};x.setUserId=function(a,b){D(b,function(c){c.setUserId(a)})};x.setUserIdFromCookie=function(a,b){D(b,function(c){c.setUserIdFromCookie(a)})};x.setUserIdFromLocation=function(a,b){D(b,function(c){c.setUserIdFromLocation(a)})};
x.setUserIdFromReferrer=function(a,b){D(b,function(c){c.setUserIdFromReferrer(a)})};x.setVisitorCookieTimeout=function(a,b){D(b,function(c){c.setVisitorCookieTimeout(a)})};x.trackPageView=function(a,b){D(b,function(c){c.trackPageView(a)})};x.trackSelfDescribingEvent=function(a,b){D(b,function(c){c=c.core;var e=c.track,f=a.event,g=f.schema,h=f.data;f=Za();g={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:g,data:h}};f.add("e","ue");f.addJson("ue_px","ue_pr",
g);e.call(c,f,a.context,a.timestamp)})};x.trackStructEvent=function(a,b){D(b,function(c){c=c.core;var e=c.track,f=a.category,g=a.action,h=a.label,m=a.property,t=a.value,q=Za();q.add("e","se");q.add("se_ca",f);q.add("se_ac",g);q.add("se_la",h);q.add("se_pr",m);q.add("se_va",null==t?void 0:t.toString());e.call(c,q,a.context,a.timestamp)})};x.updatePageActivity=function(a){D(a,function(b){b.updatePageActivity()})};x.version="3.24.2";Object.defineProperty(x,"__esModule",{value:!0})})
e;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a};return Q.apply(this,arguments)};"function"===typeof SuppressedError?SuppressedError:function(a,b,c){c=Error(c);return c.name="SuppressedError",c.error=a,c.suppressed=b,c};var ta={},Nc="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Nc){var Oc=
new Uint8Array(16);ta=function(){Nc(Oc);return Oc}}else{var Pc=Array(16);ta=function(){for(var a=0,b;16>a;a++)0===(a&3)&&(b=4294967296*Math.random()),Pc[a]=b>>>((a&3)<<3)&255;return Pc}}for(var N=[],sb=0;256>sb;++sb)N[sb]=(sb+256).toString(16).substr(1);var Qc=function(a,b){b=b||0;return[N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],"-",N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]],N[a[b++]]].join("")},Fd=ta,Rc,dc,ec=0,fc=0,Gd=
ta;ta=function(a,b,c){c=b&&c||0;"string"==typeof a&&(b="binary"===a?Array(16):null,a=null);a=a||{};a=a.random||(a.rng||Gd)();a[6]=a[6]&15|64;a[8]=a[8]&63|128;if(b)for(var e=0;16>e;++e)b[c+e]=a[e];return b||Qc(a)};ta.v1=function(a,b,c){c=b&&c||0;var e=b||[];a=a||{};var f=a.node||Rc,g=void 0!==a.clockseq?a.clockseq:dc;if(null==f||null==g){var h=Fd();null==f&&(f=Rc=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]);null==g&&(g=dc=(h[6]<<8|h[7])&16383)}h=void 0!==a.msecs?a.msecs:(new Date).getTime();var m=void 0!==a.nsecs?
a.nsecs:fc+1,t=h-ec+(m-fc)/1E4;0>t&&void 0===a.clockseq&&(g=g+1&16383);(0>t||h>ec)&&void 0===a.nsecs&&(m=0);if(1E4<=m)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");ec=h;fc=m;dc=g;h+=122192928E5;a=(1E4*(h&268435455)+m)%4294967296;e[c++]=a>>>24&255;e[c++]=a>>>16&255;e[c++]=a>>>8&255;e[c++]=a&255;a=h/4294967296*1E4&268435455;e[c++]=a>>>8&255;e[c++]=a&255;e[c++]=a>>>24&15|16;e[c++]=a>>>16&255;e[c++]=g>>>8|128;e[c++]=g&255;for(g=0;6>g;++g)e[c+g]=f[g];return b?b:Qc(e)};var ja=ta.v4=ta,
oa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",na;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(na||(na={}));var Y=function(a){void 0===a&&(a=na.warn);return{setLogLevel:function(b){a=na[b]?b:na.warn},warn:function(b,c){for(var e=[],f=2;f<arguments.length;f++)e[f-2]=arguments[f];a>=na.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,T([f+"\n",c],e,!1)):console.warn.apply(console,
T([f],e,!1)))},error:function(b,c){for(var e=[],f=2;f<arguments.length;f++)e[f-2]=arguments[f];a>=na.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,T([f+"\n",c],e,!1)):console.error.apply(console,T([f],e,!1)))},debug:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];a>=na.debug&&"undefined"!==typeof console&&console.debug.apply(console,T(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],e=1;e<arguments.length;e++)c[e-1]=arguments[e];
a>=na.info&&"undefined"!==typeof console&&console.info.apply(console,T(["Snowplow: "+b],c,!1))}}}(),Sc={},Tc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b,c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor==Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360;for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],e=0,
f=0;e<b.length;e++,f+=8)c[f>>>5]|=b[e]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],e=0;e<32*b.length;e+=8)c.push(b[e>>>5]>>>24-e%32&255);return c},bytesToHex:function(b){for(var c=[],e=0;e<b.length;e++)c.push((b[e]>>>4).toString(16)),c.push((b[e]&15).toString(16));return c.join("")},hexToBytes:function(b){for(var c=[],e=0;e<b.length;e+=2)c.push(parseInt(b.substr(e,2),16));return c},bytesToBase64:function(b){for(var c=[],e=0;e<b.length;e+=3)for(var f=b[e]<<16|b[e+1]<<8|b[e+2],g=0;4>g;g++)8*
e+6*g<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-g)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig,"");for(var c=[],e=0,f=0;e<b.length;f=++e%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(e-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(e))>>>6-2*f);return c}};Tc=a})();var gc=
{utf8:{stringToBytes:function(a){return gc.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(gc.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},Uc=gc;(function(){var a=Tc,b=Uc.utf8,c=Uc.bin,e=function(f,g){var h=a.wordsToBytes,m=f;m.constructor==String?
m=b.stringToBytes(m):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(m)?m=Array.prototype.slice.call(m,0):Array.isArray(m)||(m=m.toString());f=a.bytesToWords(m);var t=8*m.length;m=[];var q=1732584193,z=-271733879,w=-1732584194,r=271733878,k=-1009589776;f[t>>5]|=128<<24-t%32;f[(t+64>>>9<<4)+15]=t;for(t=0;t<f.length;t+=16){for(var A=q,L=z,P=w,H=r,I=k,G=0;80>G;G++){if(16>G)m[G]=f[t+G];else{var ea=m[G-3]^m[G-8]^m[G-14]^m[G-16];m[G]=ea<<1|ea>>>31}ea=(q<<5|q>>>27)+k+(m[G]>>>
0)+(20>G?(z&w|~z&r)+1518500249:40>G?(z^w^r)+1859775393:60>G?(z&w|z&r|w&r)-1894007588:(z^w^r)-899497514);k=r;r=w;w=z<<30|z>>>2;z=q;q=ea}q+=A;z+=L;w+=P;r+=H;k+=I}h=h.call(a,[q,z,w,r,k]);return g&&g.asBytes?h:g&&g.asString?c.bytesToString(h):a.bytesToHex(h)};e._blocksize=16;e._digestsize=20;Sc=e})();var sd=Sc,jd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},yc=!1,gb,Va="x",Ya={},Ed=function(){return function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=
[]}}(),Vc="undefined"!==typeof window?Dd():void 0;x.addGlobalContexts=function(a,b){D(b,function(c){c.core.addGlobalContexts(a)})};x.addPlugin=function(a,b){D(b,function(c){c.addPlugin(a)})};x.clearGlobalContexts=function(a){D(a,function(b){b.core.clearGlobalContexts()})};x.clearUserData=function(a,b){D(b,function(c){c.clearUserData(a)})};x.crossDomainLinker=function(a,b){D(b,function(c){c.crossDomainLinker(a)})};x.disableActivityTracking=function(a){D(a,function(b){b.disableActivityTracking()})};
x.disableActivityTrackingCallback=function(a){D(a,function(b){b.disableActivityTrackingCallback()})};x.disableAnonymousTracking=function(a,b){D(b,function(c){c.disableAnonymousTracking(a)})};x.discardBrace=function(a,b){D(b,function(c){c.discardBrace(a)})};x.discardHashTag=function(a,b){D(b,function(c){c.discardHashTag(a)})};x.enableActivityTracking=function(a,b){D(b,function(c){c.enableActivityTracking(a)})};x.enableActivityTrackingCallback=function(a,b){D(b,function(c){c.enableActivityTrackingCallback(a)})};
x.enableAnonymousTracking=function(a,b){D(b,function(c){c.enableAnonymousTracking(a)})};x.flushBuffer=function(a,b){D(b,function(c){c.flushBuffer(a)})};x.newSession=function(a){D(a,function(b){b.newSession()})};x.newTracker=function(a,b,c){void 0===c&&(c={});if(Vc){var e="js-".concat("3.24.3");Ya.hasOwnProperty(a)?a=null:(Ya[a]=pd(a,a,e,b,Vc,c),a=Ya[a]);return a}};x.preservePageViewId=function(a){D(a,function(b){b.preservePageViewId()})};x.removeGlobalContexts=function(a,b){D(b,function(c){c.core.removeGlobalContexts(a)})};
x.setBufferSize=function(a,b){D(b,function(c){c.setBufferSize(a)})};x.setCollectorUrl=function(a,b){D(b,function(c){c.setCollectorUrl(a)})};x.setCookiePath=function(a,b){D(b,function(c){c.setCookiePath(a)})};x.setCustomUrl=function(a,b){D(b,function(c){c.setCustomUrl(a)})};x.setDocumentTitle=function(a,b){D(b,function(c){c.setDocumentTitle(a)})};x.setOptOutCookie=function(a,b){D(b,function(c){c.setOptOutCookie(a)})};x.setReferrerUrl=function(a,b){D(b,function(c){c.setReferrerUrl(a)})};x.setUserId=
function(a,b){D(b,function(c){c.setUserId(a)})};x.setUserIdFromCookie=function(a,b){D(b,function(c){c.setUserIdFromCookie(a)})};x.setUserIdFromLocation=function(a,b){D(b,function(c){c.setUserIdFromLocation(a)})};x.setUserIdFromReferrer=function(a,b){D(b,function(c){c.setUserIdFromReferrer(a)})};x.setVisitorCookieTimeout=function(a,b){D(b,function(c){c.setVisitorCookieTimeout(a)})};x.trackPageView=function(a,b){D(b,function(c){c.trackPageView(a)})};x.trackSelfDescribingEvent=function(a,b){D(b,function(c){c=
c.core;var e=c.track,f=a.event,g=f.schema,h=f.data;f=Za();g={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:g,data:h}};f.add("e","ue");f.addJson("ue_px","ue_pr",g);e.call(c,f,a.context,a.timestamp)})};x.trackStructEvent=function(a,b){D(b,function(c){c=c.core;var e=c.track,f=a.category,g=a.action,h=a.label,m=a.property,t=a.value,q=Za();q.add("e","se");q.add("se_ca",f);q.add("se_ac",g);q.add("se_la",h);q.add("se_pr",m);q.add("se_va",null==t?void 0:t.toString());
e.call(c,q,a.context,a.timestamp)})};x.updatePageActivity=function(a){D(a,function(b){b.updatePageActivity()})};x.version="3.24.3";Object.defineProperty(x,"__esModule",{value:!0})})
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@snowplow/browser-tracker",
"version": "3.24.2",
"version": "3.24.3",
"description": "Browser tracker for Snowplow",

@@ -35,5 +35,5 @@ "keywords": [

"dependencies": {
"@snowplow/browser-tracker-core": "3.24.2",
"@snowplow/tracker-core": "3.24.2",
"tslib": "^2.3.1"
"tslib": "^2.3.1",
"@snowplow/browser-tracker-core": "3.24.3",
"@snowplow/tracker-core": "3.24.3"
},

@@ -66,4 +66,3 @@ "devDependencies": {

"test": "jest"
},
"readme": "# Snowplow Browser Tracker\n\n[![npm version][npm-image]][npm-url]\n[![License][license-image]](LICENSE)\n\nAdd Snowplow Tracking to your Web Application with `@snowplow/browser-tracker`. \n\n## Maintainer quick start\n\nPart of the Snowplow JavaScript Tracker monorepo. \nBuild with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/).\n\n### Setup repository\n\n```bash\nnpm install -g @microsoft/rush \ngit clone https://github.com/snowplow/snowplow-javascript-tracker.git\nrush update\n```\n\n## Package Installation\n\nWith npm:\n\n```bash\nnpm install @snowplow/browser-tracker\n```\n\n## Usage\n\nInitialize your tracker with your desired configuration and optional plugins:\n\n```js\nimport { newTracker } from '@snowplow/browser-tracker';\nimport { SiteTrackingPlugin } from '@snowplow/browser-plugin-site-tracking';\nimport { PerformanceTimingPlugin } from '@snowplow/browser-plugin-performance-timing';\nimport { ClientHintsPlugin } from '@snowplow/browser-plugin-client-hints';\nimport { FormTrackingPlugin, enableFormTracking } from '@snowplow/browser-plugin-form-tracking';\n\nnewTracker('sp1', '{{collector}}', { plugins: [ PerformanceTimingPlugin(), SiteTrackingPlugin(), ClientHintsPlugin(), FormTrackingPlugin() ] }); // Also stores reference at module level\nnewTracker('sp2', '{{collector}}', { plugins: [ PerformanceTimingPlugin(), SiteTrackingPlugin() ] }); // You can have multiple trackers with different configs!\n\nenableFormTracking() // Switch on form tracking\n\n```\n\nThen use the `trackX` functions from this package and your plugins to track to all trackers which have been initialized, or select just some trackers:\n\n```js\nimport { trackPageView } from '@snowplow/browser-tracker';\nimport { trackSocialInteraction } from '@snowplow/browser-plugin-site-tracking';\n\ntrackPageView({}, ['sp1']); // Just to `sp1`\n\n// OR to all trackers with some extra context!\ntrackPageView({\n title: 'My Title',\n context: [\n {\n schema: 'iglu:org.schema/WebPage/jsonschema/1-0-0',\n data: {\n keywords: ['tester'],\n },\n },\n ],\n});\n\n// Use your plugin track methods too\ntrackSocialInteraction({\n action: 'retweet',\n network: 'twitter',\n target: '1234',\n});\n\n\n```\n\n## Copyright and license\n\nLicensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).\n\nCopyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.\n\nAll rights reserved.\n\n[npm-url]: https://www.npmjs.com/package/@snowplow/browser-tracker\n[npm-image]: https://img.shields.io/npm/v/@snowplow/browser-tracker\n[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/\n[osi]: https://opensource.org/licenses/BSD-3-Clause\n[license-image]: https://img.shields.io/npm/l/@snowplow/browser-tracker\n"
}
}

@@ -11,3 +11,3 @@ # Snowplow Browser Tracker

Part of the Snowplow JavaScript Tracker monorepo.
Build with [Node.js](https://nodejs.org/en/) (14 or 16) and [Rush](https://rushjs.io/).
Build with [Node.js](https://nodejs.org/en/) (18 - 20) and [Rush](https://rushjs.io/).

@@ -14,0 +14,0 @@ ### Setup repository

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc