Skip to content

Instantly share code, notes, and snippets.

@stripedpurple
Created July 15, 2020 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stripedpurple/cdf5d340a4a6c7338fac62c22ecec8c6 to your computer and use it in GitHub Desktop.
Save stripedpurple/cdf5d340a4a6c7338fac62c22ecec8c6 to your computer and use it in GitHub Desktop.
!function(e,t,o){var n=e.history,i=document,r=navigator||{},a=localStorage,c=encodeURIComponent,d=n.pushState,l=function(){return a.cid||(a.cid=Math.random().toString(36)),a.cid},s=function(t,n,a,d,s,u,v){var p="https://www.google-analytics.com/collect",h=function(e){var t=[];for(var o in e)e.hasOwnProperty(o)&&void 0!==e[o]&&t.push(c(o)+"="+c(e[o]));return t.join("&")}({v:"1",ds:"web",aip:o.anonymizeIp?1:void 0,tid:"UA-82909329-2",cid:l(),t:t||"pageview",sd:o.colorDepth&&screen.colorDepth?screen.colorDepth+"-bits":void 0,dr:i.referrer||void 0,dt:i.title,dl:i.location.origin+i.location.pathname+i.location.search,ul:o.language?(r.language||"").toLowerCase():void 0,de:o.characterSet?i.characterSet:void 0,sr:o.screenSize?(e.screen||{}).width+"x"+(e.screen||{}).height:void 0,vp:o.screenSize&&e.visualViewport?(e.visualViewport||{}).width+"x"+(e.visualViewport||{}).height:void 0,ec:n||void 0,ea:a||void 0,el:d||void 0,ev:s||void 0,exd:u||void 0,exf:void 0!==v&&0==!!v?0:void 0});if(r.sendBeacon)r.sendBeacon(p,h);else{var g=new XMLHttpRequest;g.open("POST",p,!0),g.send(h)}};n.pushState=function(e){return"function"==typeof n.onpushstate&&n.onpushstate({state:e}),setTimeout(s,o.delay||10),d.apply(n,arguments)},s(),e.ma={trackEvent:function(e,t,o,n){return s("event",e,t,o,n)},trackException:function(e,t){return s("exception",null,null,null,null,e,t)}}}(window,0,{anonymizeIp:!0,colorDepth:!0,characterSet:!0,screenSize:!0,language:!0});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment