forked from segmentio/analytics.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analytics.min.js
4 lines (4 loc) · 22.5 KB
/
analytics.min.js
1
2
3
4
// Analytics.js 0.4.4
// (c) 2013 Segment.io Inc.
// Analytics.js may be freely distributed under the MIT license.
(function(){var e={userId:null,date:new Date,loaded:!1,initialized:!1,timeout:250,initializableProviders:{},providers:[],addProvider:function(e,t){this.initializableProviders[e]=t},initialize:function(e){this.providers=[],this.userId=null;for(var t in e){var n=this.initializableProviders[t],r=e[t];if(!n)throw new Error('Could not find a provider named "'+t+'"');n.initialize(r),this.providers.push(n)}this.initialized=!0;var i=this.utils.getUrlParameter(window.location.search,"ajs_uid");i&&this.identify(i);var s=this.utils.getUrlParameter(window.location.search,"ajs_event");s&&this.track(s)},identify:function(e,t,n){if(!this.initialized)return;this.utils.isFunction(t)&&(n=t,t=null),this.utils.isObject(e)&&(t&&this.utils.isFunction(t)&&(n=t),t=e,e=null),e!==null?this.userId=e:e=this.userId;for(var r=0,i;i=this.providers[r];r++){if(!i.identify)continue;i.identify(e,this.utils.clone(t))}n&&this.utils.isFunction(n)&&setTimeout(n,this.timeout)},track:function(e,t,n){if(!this.initialized)return;this.utils.isFunction(t)&&(n=t,t=null);for(var r=0,i;i=this.providers[r];r++){if(!i.track)continue;i.track(e,this.utils.clone(t))}n&&this.utils.isFunction(n)&&setTimeout(n,this.timeout)},trackLink:function(e,t,n){if(!e)return;this.utils.isElement(e)&&(e=[e]);for(var r=0;r<e.length;r++){var i=this,s=e[r];this.utils.bind(s,"click",function(e){i.utils.isFunction(n)&&(n=n(s)),i.track(t,n),s.href&&s.target!=="_blank"&&!i.utils.isMeta(e)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,setTimeout(function(){window.location.href=s.href},i.timeout))})}},trackForm:function(e,t,n){if(!e)return;this.utils.isElement(e)&&(e=[e]);for(var r=0;r<e.length;r++){var i=this,s=e[r];this.utils.bind(s,"submit",function(e){i.utils.isFunction(n)&&(n=n(s)),i.track(t,n),e.preventDefault?e.preventDefault():e.returnValue=!1,setTimeout(function(){s.submit()},this.timeout)})}},pageview:function(e){if(!this.initialized)return;for(var t=0,n;n=this.providers[t];t++){if(!n.pageview)continue;n.pageview(e)}},utils:{bind:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},isMeta:function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return!0;var t=e.which,n=e.button;return!t&&n!==undefined?!n&1&&!n&2&&n&4:t===2?!0:!1},getSeconds:function(e){return Math.floor(new Date(e)/1e3)},extend:function(e){var t=Array.prototype.slice.call(arguments,1);for(var n=0,r;r=t[n];n++)for(var i in r)e[i]=r[i];return e},clone:function(e){if(!e)return;return this.extend({},e)},alias:function(e,t){for(var n in t){var r=t[n];e[n]!==undefined&&(e[r]=e[n],delete e[n])}},isElement:function(e){return!!e&&e.nodeType===1},isArray:Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},isObject:function(e){return e===Object(e)},isString:function(e){return Object.prototype.toString.call(e)==="[object String]"},isFunction:function(e){return Object.prototype.toString.call(e)==="[object Function]"},isNumber:function(e){return Object.prototype.toString.call(e)==="[object Number]"},isEmail:function(e){return/.+\@.+\..+/.test(e)},resolveSettings:function(e,t){if(!this.isString(e)&&!this.isObject(e))throw new Error("Could not resolve settings.");if(!t)throw new Error("You must provide an api key field name.");if(this.isString(e)){var n=e;e={},e[t]=n}return e},getUrlParameter:function(e,t){var n=e.replace("?","").split("&");for(var r=0;r<n.length;r+=1){var i=n[r].split("=");if(i.length===2&&i[0]===t)return decodeURIComponent(i[1])}},parseUrl:function(e){var t=document.createElement("a");return t.href=e,{href:t.href,host:t.host||location.host,port:t.port||location.port,hash:t.hash,hostname:t.hostname||location.hostname,pathname:t.pathname,protocol:!t.protocol||":"===t.protocol?location.protocol:t.protocol,search:t.search,query:t.search.slice(1)}}}};e.trackClick=e.trackLink,e.trackSubmit=e.trackForm;var t=window.onload;window.onload=function(){e.loaded=!0,e.utils.isFunction(t)&&t()},window.analytics=e})(),analytics.addProvider("Bitdeli",{settings:{inputId:null,authToken:null,initialPageview:!0},initialize:function(e){var t=analytics.utils;if(!t.isObject(e)||!t.isString(e.inputId)||!t.isString(e.authToken))throw new Error("Settings must be an object with properties 'inputId' and 'authToken'.");t.extend(this.settings,e);var n=window._bdq=window._bdq||[];n.push(["setAccount",this.settings.inputId,this.settings.authToken]),this.settings.initialPageview&&n.push(["trackPageview"]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://":"http://")+"d2flrkr957qc5j.cloudfront.net/bitdeli.min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()},identify:function(e,t){e&&window._bdq.push(["identify",e]),t&&window._bdq.push(["set",t])},track:function(e,t){window._bdq.push(["track",e,t])},pageview:function(e){window._bdq.push(["trackPageview",e])}}),analytics.addProvider("Chartbeat",{settings:{domain:null,uid:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"uid"),analytics.utils.extend(this.settings,e),window._sf_async_config=this.settings||{},function(){window._sf_endpt=analytics.date.getTime();var e=document.createElement("script");e.setAttribute("language","javascript"),e.setAttribute("type","text/javascript"),e.setAttribute("src",("https:"==document.location.protocol?"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/":"http://static.chartbeat.com/")+"js/chartbeat.js"),document.body.appendChild(e)}()},pageview:function(e){window.pSUPERFLY.virtualPage(e||window.location.pathname)}}),analytics.addProvider("Clicky",{settings:{siteId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteId"),analytics.utils.extend(this.settings,e);var t=window.clicky_site_ids=window.clicky_site_ids||[];t.push(e.siteId),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0;var t="https:"==document.location.protocol?"https:":"http:";e.src=t+"//static.getclicky.com/js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)}()},track:function(e,t){window.clicky&&window.clicky.log(window.location.href,e)}}),analytics.addProvider("comScore",{settings:{c1:"2",c2:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"c2"),analytics.utils.extend(this.settings,e);var t=window._comscore=window._comscore||[];t.push(this.settings),function(){var e=document.createElement("script"),t=document.getElementsByTagName("script")[0];e.async=!0,e.src=(document.location.protocol=="https:"?"https://sb":"http://b")+".scorecardresearch.com/beacon.js",t.parentNode.insertBefore(e,t)}()}}),analytics.addProvider("CrazyEgg",{settings:{apiKey:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"apiKey"),analytics.utils.extend(this.settings,e);var t=this.settings.apiKey;(function(){var e=document.createElement("script"),n=document.getElementsByTagName("script")[0],r="https:"==document.location.protocol?"https:":"http:";e.src=r+"//dnn506yrbagrg.cloudfront.net/pages/scripts/"+t+".js?"+Math.floor((new Date).getTime()/36e5),e.async=!0,e.type="text/javascript",n.parentNode.insertBefore(e,n)})()}}),analytics.addProvider("Customer.io",{settings:{siteId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteId"),analytics.utils.extend(this.settings,e);var t=this,n=window._cio=window._cio||[];(function(){var e,r,i;e=function(e){return function(){n.push([e].concat(Array.prototype.slice.call(arguments,0)))}},r=["identify","track"];for(i=0;i<r.length;i++)n[r[i]]=e(r[i]);var s=document.createElement("script"),o=document.getElementsByTagName("script")[0];s.async=!0,s.id="cio-tracker",s.setAttribute("data-site-id",t.settings.siteId),s.src="https://assets.customer.io/assets/track.js",o.parentNode.insertBefore(s,o)})()},identify:function(e,t){if(!e)return;t||(t={}),t.id=e,!t.email&&analytics.utils.isEmail(e)&&(t.email=e),t.created&&(t.created_at=analytics.utils.getSeconds(t.created),delete t.created),window._cio.identify(t)},track:function(e,t){window._cio.track(e,t)}}),analytics.addProvider("Errorception",{settings:{projectId:null,meta:!0},initialize:function(e){e=analytics.utils.resolveSettings(e,"projectId"),analytics.utils.extend(this.settings,e);var t=window._errs=window._errs||[e.projectId];(function(e,n){e.onerror=function(){t.push(arguments)};var r=function(){var e=n.createElement("script"),t=n.getElementsByTagName("script")[0],r="https:"==document.location.protocol?"https:":"http:";e.src=r+"//d15qhc0lu1ghnk.cloudfront.net/beacon.js",e.async=!0,t.parentNode.insertBefore(e,t)};e.addEventListener?e.addEventListener("load",r,!1):e.attachEvent("onload",r)})(window,document)},identify:function(e,t){if(!t)return;window._errs.meta||(window._errs.meta={}),this.settings.meta&&analytics.utils.extend(window._errs.meta,t)}}),analytics.addProvider("FoxMetrics",{settings:{appId:null},initialize:function(e){function n(e){(function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=("https:"==document.location.protocol?"https://":"http://")+"d35tca7vmefkrc.cloudfront.net/scripts/"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)})()}e=analytics.utils.resolveSettings(e,"appId"),analytics.utils.extend(this.settings,e);var t=window._fxm||{};window._fxm=t.events||[],n(this.settings.appId)},identify:function(e,t){if(e){var n=null,r=null,i=null;t&&(n=t.name.split(" ")[0],r=t.name.split(" ")[1],i=typeof t.email!="undefined"?t.email:null),window._fxm.push(["_fxm.visitor.Profile",e,n,r,i,null,null,null,t||null])}},track:function(e,t){window._fxm.push([e,null,t])},pageview:function(e){window._fxm.push(["_fxm.pages.view",null,null,null,e||null,null])}}),analytics.addProvider("Google Analytics",{settings:{anonymizeIp:!1,enhancedLinkAttribution:!1,siteSpeedSampleRate:null,domain:null,trackingId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"trackingId"),analytics.utils.extend(this.settings,e);var t=window._gaq=window._gaq||[];t.push(["_setAccount",this.settings.trackingId]),this.settings.domain&&t.push(["_setDomainName",this.settings.domain]);if(this.settings.enhancedLinkAttribution){var n=("https:"==document.location.protocol?"https://www.":"http://www.")+"google-analytics.com/plugins/ga/inpage_linkid.js";t.push(["_require","inpage_linkid",n])}analytics.utils.isNumber(this.settings.siteSpeedSampleRate)&&t.push(["_setSiteSpeedSampleRate",this.settings.siteSpeedSampleRate]),this.settings.anonymizeIp&&t.push(["_gat._anonymizeIp"]),t.push(["_trackPageview"]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()},track:function(e,t){t||(t={});var n;analytics.utils.isNumber(t.value)&&(n=t.value),window._gaq.push(["_trackEvent",t.category||"All",e,t.label,n,t.noninteraction])},pageview:function(e){window._gaq.push(["_trackPageview",e])}}),analytics.addProvider("Gauges",{settings:{siteId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteId"),analytics.utils.extend(this.settings,e);var t=window._gauges=window._gauges||[];(function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.id="gauges-tracker",t.setAttribute("data-site-id",e.siteId);var n="https:"==document.location.protocol?"https:":"http:";t.src=n+"//secure.gaug.es/track.js";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)})()},pageview:function(e){window._gauges.push(["track"])}}),analytics.addProvider("GoSquared",{settings:{siteToken:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteToken"),analytics.utils.extend(this.settings,e);var t=window.GoSquared={};t.acct=this.settings.siteToken,t.q=[],window._gstc_lt=+(new Date);var n=document,r=n.createElement("script");r.type="text/javascript",r.async=!0;var i="https:"==n.location.protocol?"https:":"http:";r.src=i+"//d1l6p2sc9645hc.cloudfront.net/tracker.js";var s=n.getElementsByTagName("script")[0];s.parentNode.insertBefore(r,s)},identify:function(e,t){e&&(window.GoSquared.UserName=e),t&&(window.GoSquared.Visitor=t)},track:function(e,t){t||(t={}),window.GoSquared.q.push(["TrackEvent",e,t])},pageview:function(e){var t=["TrackView"];e&&t.push(e),window.GoSquared.q.push(t)}}),analytics.addProvider("HitTail",{settings:{siteId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteId"),analytics.utils.extend(this.settings,e);var t=e.siteId;(function(){var e=document.createElement("script");e.async=!0,e.type="text/javascript",e.src=("https:"==document.location.protocol?"https://":"http://")+t+".hittail.com/mlt.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)})()}}),analytics.addProvider("HubSpot",{settings:{portalId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"portalId"),analytics.utils.extend(this.settings,e);var t=this;(function(e,n,r,i){if(e.getElementById(r))return;window._hsq=window._hsq||[];var s=e.createElement(n),o=e.getElementsByTagName(n)[0];s.id=r,s.src="https://js.hubspot.com/analytics/"+Math.ceil(new Date/i)*i+"/"+t.settings.portalId+".js",o.parentNode.insertBefore(s,o)})(document,"script","hs-analytics",3e5)},identify:function(e,t){if(!t)return;window._hsq.push(["identify",t])},track:function(e,t){window._hsq.push(["trackEvent",e,t])},pageview:function(){}}),analytics.addProvider("Intercom",{settings:{appId:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"appId"),analytics.utils.extend(this.settings,e)},identify:function(e,t){function n(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://api.intercom.io/api/js/library.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}if(!e)return;window.intercomSettings={app_id:this.settings.appId,user_id:e,user_hash:this.settings.userHash,custom_data:t||{}},t&&(window.intercomSettings.email=t.email,window.intercomSettings.name=t.name,window.intercomSettings.created_at=analytics.utils.getSeconds(t.created)),analytics.utils.isEmail(e)&&t&&!t.email&&(window.intercomSettings.email=e),window.attachEvent?window.attachEvent("onload",n):window.addEventListener("load",n,!1)}}),analytics.addProvider("Keen",{settings:{projectId:null,apiKey:null},initialize:function(e){if(typeof e!="object"||!e.projectId||!e.apiKey)throw new Error("Settings must be an object with properties projectId and apiKey.");analytics.utils.extend(this.settings,e);var t=window.Keen||{configure:function(e,t,n){this._pId=e,this._ak=t,this._op=n},addEvent:function(e,t,n,r){this._eq=this._eq||[],this._eq.push([e,t,n,r])},setGlobalProperties:function(e){this._gp=e},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e)}};(function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://":"http://")+"dc8na2hxrj29i.cloudfront.net/code/keen-2.0.0-min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(),t.configure(e.projectId,e.apiKey),window.Keen=t},identify:function(e,t){var n={};e&&(n.userId=e),t&&(n.traits=t),(e||t)&&window.Keen.setGlobalProperties(function(e){return{user:n}})},track:function(e,t){window.Keen.addEvent(e,t)}}),analytics.addProvider("KISSmetrics",{settings:{apiKey:null},initialize:function(e){function n(e){setTimeout(function(){var t=document,n=t.getElementsByTagName("script")[0],r=t.createElement("script");r.type="text/javascript",r.async=!0;var i="https:"==document.location.protocol?"https:":"http:";r.src=i+e,n.parentNode.insertBefore(r,n)},1)}e=analytics.utils.resolveSettings(e,"apiKey"),analytics.utils.extend(this.settings,e);var t=window._kmq=window._kmq||[];n("//i.kissmetrics.com/i.js"),n("//doug1izaerwt3.cloudfront.net/"+this.settings.apiKey+".1.js")},identify:function(e,t){e&&window._kmq.push(["identify",e]),t&&window._kmq.push(["set",t])},track:function(e,t){window._kmq.push(["record",e,t])}}),analytics.addProvider("Klaviyo",{settings:{apiKey:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"apiKey"),analytics.utils.extend(this.settings,e);var t=window._learnq=window._learnq||[];t.push(["account",this.settings.apiKey]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"==document.location.protocol?"https://":"http://")+"a.klaviyo.com/media/js/learnmarklet.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}()},identify:function(e,t){t||(t={}),e&&(t.$id=e),window._learnq.push(["identify",t])},track:function(e,t){window._learnq.push(["track",e,t])}}),analytics.addProvider("Mixpanel",{settings:{nameTag:!0,people:!1,token:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"token"),analytics.utils.extend(this.settings,e),function(e,t){window.mixpanel=t;var n,r,i,s;n=e.createElement("script"),n.type="text/javascript",n.async=!0,n.src=("https:"===e.location.protocol?"https:":"http:")+"//cdn.mxpnl.com/libs/mixpanel-2.2.min.js",r=e.getElementsByTagName("script")[0],r.parentNode.insertBefore(n,r),t._i=[],t.init=function(e,n,r){function o(e,t){var n=t.split(".");2==n.length&&(e=e[n[0]],t=n[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var u=t;"undefined"!=typeof r?u=t[r]=[]:r="mixpanel",u.people=u.people||[],i=["disable","track","track_pageview","track_links","track_forms","register","register_once","unregister","identify","alias","name_tag","set_config","people.set","people.increment"];for(s=0;s<i.length;s++)o(u,i[s]);t._i.push([e,n,r])},t.__SV=1.2}(document,window.mixpanel||[]),window.mixpanel.init(this.settings.token,this.settings)},identify:function(e,t){e&&analytics.utils.isEmail(e)&&t&&!t.email&&(t||(t={}),t.email=e),t&&analytics.utils.alias(t,{created:"$created",email:"$email",firstName:"$first_name",lastName:"$last_name",lastSeen:"$last_seen",name:"$name",username:"$username"}),e&&(window.mixpanel.identify(e),this.settings.nameTag&&window.mixpanel.name_tag(t&&t.$email||e)),t&&(window.mixpanel.register(t),this.settings.people&&window.mixpanel.people.set(t))},track:function(e,t){window.mixpanel.track(e,t)},pageview:function(e){window.mixpanel.track_pageview(e)}}),analytics.addProvider("Olark",{settings:{siteId:null,track:!1,pageview:!0},initialize:function(e){e=analytics.utils.resolveSettings(e,"siteId"),analytics.utils.extend(this.settings,e),window.olark||function(e){var t=window,n=document,r=t.location.protocol=="https:"?"https:":"http:",i=e.name,s="load",o=function(){function h(){u.P(s),t[i](s)}t[i]=function(){(u.s=u.s||[]).push(arguments)};var u=t[i]._={},a=e.methods.length;while(a--)(function(e){t[i][e]=function(){t[i]("call",e,arguments)}})(e.methods[a]);u.l=e.loader,u.i=o,u.p={0:+(new Date)},u.P=function(e){u.p[e]=new Date-u.p[0]},t.addEventListener?t.addEventListener(s,h,!1):t.attachEvent("on"+s,h);var p=function(){function t(e){return e="head",["<",e,"></",e,"><",s,' onload="var d=',y,";d.getElementsByTagName('head')[0].",a,"(d.",f,"('script')).",h,"='",r,"//",u.l,"'",'"',"></",s,">"].join("")}var s="body",o=n[s];if(!o)return setTimeout(p,100);u.P(1);var a="appendChild",f="createElement",h="src",v=n[f]("div"),m=v[a](n[f](i)),g=n[f]("iframe"),y="document",b="domain",w;v.style.display="none",o.insertBefore(v,o.firstChild).id=i,g.frameBorder="0",g.id=i+"-loader",/MSIE[ ]+6/.test(navigator.userAgent)&&(g.src="javascript:false"),g.allowTransparency="true",m[a](g);try{g.contentWindow[y].open()}catch(E){e[b]=n[b],w="javascript:var d="+y+".open();d.domain='"+n.domain+"';",g[h]=w+"void(0);"}try{var S=g.contentWindow[y];S.write(t()),S.close()}catch(x){g[h]=w+'d.write("'+t().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}u.P(2)};p()};o()}({loader:"static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]}),window.olark.identify(this.settings.siteId)},identify:function(e,t){var n=e;t&&t.email&&(n=t.email),t&&t.name&&(n=t.name),t&&t.name&&t.email&&(n+=" ("+t.email+")");if(!n)return;window.olark("api.chat.updateVisitorNickname",{snippet:n})},track:function(e,t){if(!this.settings.track)return;window.olark("api.chat.sendNotificationToOperator",{body:'visitor triggered "'+e+'"'})},pageview:function(){if(!this.settings.pageview)return;window.olark("api.chat.sendNotificationToOperator",{body:"looking at "+window.location.href})}}),analytics.addProvider("Quantcast",{settings:{pCode:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"pCode"),analytics.utils.extend(this.settings,e);var t=window._qevents=window._qevents||[];(function(){var e=document.createElement("script");e.src=(document.location.protocol=="https:"?"https://secure":"http://edge")+".quantserve.com/quant.js",e.async=!0,e.type="text/javascript";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})(),t.push({qacct:e.pCode})}}),analytics.addProvider("SnapEngage",{settings:{apiKey:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"apiKey"),analytics.utils.extend(this.settings,e);var t=this;(function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0;var n="https:"==document.location.protocol?"https:":"http:";e.src=n+"//commondatastorage.googleapis.com/code.snapengage.com/js/"+t.settings.apiKey+".js";var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(e,r)})()}}),analytics.addProvider("USERcycle",{settings:{key:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"key"),analytics.utils.extend(this.settings,e);var t=window._uc=window._uc||[];(function(){var e=document.createElement("script");e.setAttribute("type","text/javascript");var t="https:"==document.location.protocol?"https://":"http://";e.setAttribute("src",t+"api.usercycle.com/javascripts/track.js"),document.body.appendChild(e)})(),window._uc.push(["_key",e.key])},identify:function(e,t){e&&window._uc.push(["uid",e,t])},track:function(e,t){window._uc.push(["action",e,t])}}),analytics.addProvider("Vero",{settings:{apiKey:null},initialize:function(e){e=analytics.utils.resolveSettings(e,"apiKey"),analytics.utils.extend(this.settings,e);var t=this,n=window._veroq=window._veroq||[];n.push(["init",{api_key:e.apiKey}]),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0;var t="https:"==document.location.protocol?"https:":"http:";e.src=t+"//www.getvero.com/assets/m.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)}()},identify:function(e,t){if(!e)return;t||(t={}),t.id=e,!t.email&&analytics.utils.isEmail(e)&&(t.email=e);if(!t.id||!t.email)return;window._veroq.push(["user",t])},track:function(e,t){window._veroq.push(["track",e,t])}});