mixpanel-browser
Advanced tools
Comparing version 2.51.0 to 2.52.0
@@ -42,3 +42,3 @@ (function() { | ||
/(iPhone|iPad|iPod)/.test(z)?"iOS":/Android/.test(z)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(z)?"BlackBerry":/Mac/i.test(z)?"Mac OS X":/Linux/.test(z)?"Linux":/CrOS/.test(z)?"Chrome OS":""},Bb:function(a){return/Windows Phone/i.test(a)||/WPDesktop/.test(a)?"Windows Phone":/iPad/.test(a)?"iPad":/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":/Android/.test(a)?"Android":""},Sb:function(a){a=a.split("/");return 3<=a.length?a[2]:""},La:function(){return n.location.href}, | ||
aa:function(a){"object"!==typeof a&&(a={});return c.extend(c.fa({$os:c.info.Nb(),$browser:c.info.ma(z,I.vendor,Y),$referrer:t.referrer,$referring_domain:c.info.Sb(t.referrer),$device:c.info.Bb(z)}),{$current_url:c.info.La(),$browser_version:c.info.Ia(z,I.vendor,Y),$screen_height:Z.height,$screen_width:Z.width,mp_lib:"web",$lib_version:"2.51.0",$insert_id:ea(),time:c.timestamp()/1E3},c.fa(a))},Sc:function(){return c.extend(c.fa({$os:c.info.Nb(),$browser:c.info.ma(z,I.vendor,Y)}),{$browser_version:c.info.Ia(z, | ||
aa:function(a){"object"!==typeof a&&(a={});return c.extend(c.fa({$os:c.info.Nb(),$browser:c.info.ma(z,I.vendor,Y),$referrer:t.referrer,$referring_domain:c.info.Sb(t.referrer),$device:c.info.Bb(z)}),{$current_url:c.info.La(),$browser_version:c.info.Ia(z,I.vendor,Y),$screen_height:Z.height,$screen_width:Z.width,mp_lib:"web",$lib_version:"2.52.0",$insert_id:ea(),time:c.timestamp()/1E3},c.fa(a))},Sc:function(){return c.extend(c.fa({$os:c.info.Nb(),$browser:c.info.ma(z,I.vendor,Y)}),{$browser_version:c.info.Ia(z, | ||
I.vendor,Y)})},Pc:function(){return c.fa({current_page_title:t.title,current_domain:n.location.hostname,current_url_path:n.location.pathname,current_url_protocol:n.location.protocol,current_url_search:n.location.search})}};var Ga=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Fa=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,$=r,aa=r;if("undefined"!==typeof JSON)$=JSON.stringify,aa=JSON.parse;$=$||c.ha;aa=aa||c.S;c.toArray=c.O;c.isObject=c.e;c.JSONEncode=c.ha;c.JSONDecode=c.S;c.isBlockedUA=c.Ib;c.isEmptyObject=c.ra;c.info= | ||
@@ -54,3 +54,3 @@ c.info;c.info.device=c.info.Bb;c.info.browser=c.info.ma;c.info.browserVersion=c.info.Ia;c.info.properties=c.info.aa;E.prototype.oa=function(){};E.prototype.Oa=function(){};E.prototype.Ga=function(){};E.prototype.Ua=function(a){this.Kb=a;return this};E.prototype.o=function(a,b,d,f){var h=this,g=c.Cc(a);if(0===g.length)o.error("The DOM query ("+a+") returned 0 elements");else return c.a(g,function(a){c.Tb(a,this.Ob,function(a){var c={},g=h.oa(d,this),e=h.Kb.c("track_links_timeout");h.Oa(a,this,c);window.setTimeout(h.gc(f, | ||
b){this.ba.Na(a,this.pa,b)};C.prototype.start=function(){this.va=D;this.Ja=0;this.flush()};C.prototype.stop=function(){this.va=m;if(this.cb)clearTimeout(this.cb),this.cb=r};C.prototype.clear=function(){this.ba.clear()};C.prototype.Wb=function(){this.D=this.B.batch_size};C.prototype.ea=function(){this.Xb(this.B.batch_flush_interval_ms)};C.prototype.Xb=function(a){this.pa=a;if(!this.va)this.cb=setTimeout(c.bind(this.flush,this),this.pa)};C.prototype.flush=function(a){try{if(this.Vb)R.log("Flush: Request already in progress"); | ||
else{var a=a||{},b=this.B.batch_request_timeout_ms,d=(new Date).getTime(),f=this.D,h=this.ba.Ec(f),e=[],v={};c.a(h,function(a){var b=a.payload;this.la&&!a.Rc&&(b=this.la(b));if(b){b.event&&b.properties&&(b.properties=c.extend({},b.properties,{mp_sent_by_lib_version:"2.51.0"}));var d=m,f=a.id;if(f){if(5<(this.G[f]||0))this.h("[dupe] item ID sent too many times, not sending",{item:a,D:h.length,od:this.G[f]}),d=D}else this.h("[dupe] found item with no ID",{item:a});d&&e.push(b)}v[a.id]=b},this);if(1> | ||
else{var a=a||{},b=this.B.batch_request_timeout_ms,d=(new Date).getTime(),f=this.D,h=this.ba.Ec(f),e=[],v={};c.a(h,function(a){var b=a.payload;this.la&&!a.Rc&&(b=this.la(b));if(b){b.event&&b.properties&&(b.properties=c.extend({},b.properties,{mp_sent_by_lib_version:"2.52.0"}));var d=m,f=a.id;if(f){if(5<(this.G[f]||0))this.h("[dupe] item ID sent too many times, not sending",{item:a,D:h.length,od:this.G[f]}),d=D}else this.h("[dupe] found item with no ID",{item:a});d&&e.push(b)}v[a.id]=b},this);if(1> | ||
e.length)this.ea();else{this.Vb=m;var i=c.bind(function(e){this.Vb=D;try{var g=D;if(a.ic)this.ba.vd(v);else if(c.e(e)&&"timeout"===e.error&&(new Date).getTime()-d>=b)this.h("Network timeout; retrying"),this.flush();else if(c.e(e)&&e.R&&(500<=e.R.status||429===e.R.status||"timeout"===e.error)){var i=2*this.pa,k=e.R.responseHeaders;if(k){var j=k["Retry-After"];j&&(i=1E3*parseInt(j,10)||i)}i=Math.min(6E5,i);this.h("Error; retry in "+i+" ms");this.Xb(i)}else if(c.e(e)&&e.R&&413===e.R.status)if(1<h.length){var p= | ||
@@ -79,3 +79,3 @@ Math.max(1,Math.floor(f/2));this.D=Math.min(this.D,p,h.length-1);this.h("413 response; reducing batch size to "+this.D);this.ea()}else this.h("Single-event request too large; dropping",h),this.Wb(),g=m;else g=m;g&&(this.ba.Tc(c.map(h,function(a){return a.id}),c.bind(function(a){a?(this.Ja=0,this.flush()):(this.h("Failed to remove items from queue"),5<++this.Ja?(this.h("Too many queue failures; disabling batching system."),this.jd()):this.ea())},this)),c.a(h,c.bind(function(a){var b=a.id;b?(this.G[b]= | ||
function(a){var b=(new Date).getTime(),c=this.ta("__timers")||{};c[a]=b;this.props.__timers=c;this.save()};q.prototype.Uc=function(a){var b=(this.ta("__timers")||{})[a];c.g(b)||(delete this.props.__timers[a],this.save());return b};var ca,x,O=n.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,ma=!O&&-1===z.indexOf("MSIE")&&-1===z.indexOf("Mozilla"),ba=r;I.sendBeacon&&(ba=function(){return I.sendBeacon.apply(I,arguments)});var A={track:"track/",engage:"engage/",groups:"groups/",record:"record/"}, | ||
za={api_host:"https://api-js.mixpanel.com",api_routes:A,api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:D,cross_subdomain_cookie:m,error_reporter:P,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:P,mp_loader:r,track_marketing:m,track_pageview:D,skip_first_touch_marketing:D,store_google:m,stop_utm_persistence:m,save_referrer:m,test:D,verbose:D,img:D,debug:D,track_links_timeout:300, | ||
za={api_host:"https://api-js.mixpanel.com",api_routes:A,api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:D,cross_subdomain_cookie:m,error_reporter:P,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:P,mp_loader:r,track_marketing:m,track_pageview:D,skip_first_touch_marketing:D,store_google:m,stop_utm_persistence:D,save_referrer:m,test:D,verbose:D,img:D,debug:D,track_links_timeout:300, | ||
cookie_expiration:365,upgrade:D,disable_persistence:D,disable_cookie:D,secure_cookie:D,ip:m,opt_out_tracking_by_default:D,opt_out_persistence_by_default:D,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:r,property_blacklist:[],xhr_headers:{},ignore_dnt:D,batch_requests:m,batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,batch_autostart:m,hooks:{},record_block_class:/^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$/,record_block_selector:"img, video", | ||
@@ -82,0 +82,0 @@ record_idle_timeout_ms:18E5,record_mask_text_class:/^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$/,record_mask_text_selector:"*",record_max_ms:864E5,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},la=D;e.prototype.Ua=function(a,b,d){if(c.g(d))this.l("You must name your new library: init(token, config, name)");else if("mixpanel"===d)this.l("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=S(a,b, |
{ | ||
"name": "mixpanel-browser", | ||
"version": "2.51.0", | ||
"version": "2.52.0", | ||
"description": "The official Mixpanel JavaScript browser client library", | ||
@@ -5,0 +5,0 @@ "main": "dist/mixpanel.cjs.js", |
var Config = { | ||
DEBUG: false, | ||
LIB_VERSION: '2.51.0' | ||
LIB_VERSION: '2.52.0' | ||
}; | ||
export default Config; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1750557