forked from unitoo/website
5 lines
54 KiB
JavaScript
5 lines
54 KiB
JavaScript
|
"object"!=typeof _paq&&(_paq=[]),"object"!=typeof window.Matomo&&(window.Matomo=window.Piwik=function(){function t(t){try{return ot(t)}catch(e){return unescape(t)}}function e(t){return"undefined"!==typeof t}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t}function r(t){return"string"==typeof t||t instanceof String}function o(t){return"number"==typeof t||t instanceof Number}function a(t){return e(t)&&(o(t)||r(t)&&t.length)}function s(t){if(!t)return!0;var e,n=!0;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n=!1);return n}function u(t){"undefined"!==typeof console&&console&&console.error&&console.error(t)}function c(){var t,e,n,i,o;for(t=0;t<arguments.length;t+=1){var a,s;if(o=null,arguments[t]&&arguments[t].slice&&(o=arguments[t].slice()),r(n=(i=arguments[t]).shift())&&n.indexOf("::")>0)s=(a=n.split("::"))[0],n=a[1],"object"==typeof X[s]&&"function"==typeof X[s][n]?X[s][n].apply(X[s],i):o&&st.push(o);else for(e=0;e<at.length;e++)if(r(n)){s=at[e];var c=n.indexOf(".")>0;if(c)if(a=n.split("."),s&&"object"==typeof s[a[0]])s=s[a[0]],n=a[1];else if(o){st.push(o);break}if(s[n])s[n].apply(s,i);else{var f="The method '"+n+'\' was not found in "_paq" variable. Please have a look at the Matomo tracker documentation: https://developer.matomo.org/api-reference/tracking-javascript';if(u(f),!c)throw new TypeError(f)}if("addTracker"===n)break;if("setTrackerUrl"===n||"setSiteId"===n)break}else n.apply(at[e],i)}}function f(t,e,n,i){return t.addEventListener?(t.addEventListener(e,n,i),!0):t.attachEvent?t.attachEvent("on"+e,n):void(t["on"+e]=n)}function l(t){"complete"===Z.readyState?t():nt.addEventListener?nt.addEventListener("load",t,!1):nt.attachEvent&&nt.attachEvent("onload",t)}function d(t){var e=!1;(e=Z.attachEvent?"complete"===Z.readyState:"loading"!==Z.readyState)?t():(Z.addEventListener?f(Z,"DOMContentLoaded",function n(){Z.removeEventListener("DOMContentLoaded",n,!1),e||(e=!0,t())}):Z.attachEvent&&(Z.attachEvent("onreadystatechange",function i(){"complete"===Z.readyState&&(Z.detachEvent("onreadystatechange",i),e||(e=!0,t()))}),Z.documentElement.doScroll&&nt===nt.top&&function r(){if(!e){try{Z.documentElement.doScroll("left")}catch(n){return void setTimeout(r,0)}e=!0,t()}}()),f(nt,"load",function(){e||(e=!0,t())},!1))}function h(t,e,n){if(!t)return"";var i,r,o="";for(i in $)Object.prototype.hasOwnProperty.call($,i)&&($[i]&&"function"==typeof $[i][t])&&(r=(0,$[i][t])(e||{},n))&&(o+=r);return o}function g(){var t;lt=!0,h("unload");var e=(t=new Date).getTimeAlias();if(Y-e>3e3&&(Y=e+3e3),Y)do{t=new Date}while(t.getTimeAlias()<Y)}function m(t,e){var n=Z.createElement("script");n.type="text/javascript",n.src=t,n.readyState?n.onreadystatechange=function(){var t=this.readyState;"loaded"!==t&&"complete"!==t||(n.onreadystatechange=null,e())}:n.onload=e,Z.getElementsByTagName("head")[0].appendChild(n)}function p(){var t="";try{t=nt.top.document.referrer}catch(e){if(nt.parent)try{t=nt.parent.document.referrer}catch(n){t=""}}return""===t&&(t=Z.referrer),t}function v(t){var e=new RegExp("^([a-z]+):").exec(t);return e?e[1]:null}function C(t){var e=new RegExp("^(?:(?:https?|ftp):)/*(?:[^@]+@)?([^:/#]+)").exec(t);return e?e[1]:t}function T(t){return/^[0-9][0-9]*(\.[0-9]+)?$/.test(t)}function N(t,e){var n,i={};for(n in t)t.hasOwnProperty(n)&&e(t[n])&&(i[n]=t[n]);return i}function b(t){var e,n={};for(e in t)if(t.hasOwnProperty(e)){if(!T(t[e]))throw new Error('Parameter "'+e+'" provided value "'+t[e]+'" is not valid. Please provide a numeric value.');n[e]=Math.round(t[e])}return n}function k(t){var e,n="";for(e in t)t.hasOwnProperty(e)&&(n+="&"+rt(e)+"="+rt(t[e]));return n}function w(t,e){return 0===(t=String(t)).lastIndexOf(e,0)}function y(t,e){return-1!==(t=String(t)).indexOf(e,t.length-e.length)}function A(t,e){return-1!==(t=String(t)).indexOf(e)}function E(t,e){return(t=String(t)).substr(0,t.length-e)}function _(t,e,n){n||(n="");var i=(t=String(t)).indexOf("#"),r=t.length;-1===i&&(i=r);var o=t.substr(0,i),a=t.substr(i,r-i);return-1===o.indexOf("?")?o+="?":y(o,"?")||(o+="&"),o+rt(e)+"="+rt(n)+a}function S(t
|
||
|
En=r(t)?[t]:t},this.setCampaignNameKey=function(t){On=r(t)?[t]:t},this.setCampaignKeywordKey=function(t){In=r(t)?[t]:t},this.discardHashTag=function(t){Ge=t},this.setCookieNamePrefix=function(t){Ln=t,Bn&&(Bn=xt())},this.setCookieDomain=function(t){var e=R(t);Vn||Wt(e)?(He=e,It()):u("Can't write cookie on domain "+t)},this.setExcludedQueryParams=function(t){yn=r(t)?[t]:t},this.getCookieDomain=function(){return He},this.hasCookies=function(){return"1"===Ot()},this.setSessionCookie=function(t,n,i){if(!t)throw new Error("Missing cookie name");e(i)||(i=Dn),ci.push(t),m(_t(t),n,i,Be,He,Rn,qn)},this.getCookie=function(t){var e=g(_t(t));return 0===e?null:e},this.setCookiePath=function(t){Be=t,It()},this.getCookiePath=function(){return Be},this.setVisitorCookieTimeout=function(t){Mn=1e3*t},this.setSessionCookieTimeout=function(t){Dn=1e3*t},this.getSessionCookieTimeout=function(){return Dn},this.setReferralCookieTimeout=function(t){Un=1e3*t},this.setConversionAttributionFirstReferrer=function(t){Je=t},this.setSecureCookie=function(t){t&&"https:"!==location.protocol?u("Error in setSecureCookie: You cannot use `Secure` on http."):Rn=t},this.setCookieSameSite=function(t){"None"===(t=(t=String(t)).charAt(0).toUpperCase()+t.toLowerCase().slice(1))||"Lax"===t||"Strict"===t?("None"===t&&("https:"===location.protocol?this.setSecureCookie(!0):(u("sameSite=None cannot be used on http, reverted to sameSite=Lax."),t="Lax")),qn=t):u("Ignored value for sameSite. Please use either Lax, None, or Strict.")},this.disableCookies=function(){Vn=!0,vn&&zt()},this.areCookiesEnabled=function(){return!Vn},this.setCookieConsentGiven=function(){Vn&&!We&&(Vn=!1,pi=!0,vn&&mi&&(Ht(),wt(Kt("ping=1",null,"ping"),_n)))},this.requireCookieConsent=function(){return!this.getRememberedCookieConsent()&&(this.disableCookies(),!0)},this.getRememberedCookieConsent=function(){return g(en)},this.forgetCookieConsentGiven=function(){St(en,Be,He),this.disableCookies()},this.rememberCookieConsentGiven=function(t){t=t?60*t*60*1e3:94608e7,this.setCookieConsentGiven();var e=(new Date).getTime();m(en,e,t,Be,He,Rn,qn)},this.deleteCookies=function(){zt()},this.setDoNotTrack=function(t){var e=tt.doNotTrack||tt.msDoNotTrack;(We=t&&("yes"===e||"1"===e))&&this.disableCookies()},this.alwaysUseSendBeacon=function(){Sn=!0},this.disableAlwaysUseSendBeacon=function(){Sn=!1},this.addListener=function(t,e){Ve(t,e,!1)},this.enableLinkTracking=function(t){if(!ei){ei=!0;d(function(){!0,Ve(Z.body,t,!0)})}},this.enableJSErrorTracking=function(){if(!un){un=!0;var t=nt.onerror;nt.onerror=function(e,n,i,r,o){return Ae(function(){var t="JavaScript Errors",o=n+":"+i;r&&(o+=":"+r),-1===D(hi,t+o+e)&&(hi.push(t+o+e),Ne(t,o,e))}),!!t&&t(e,n,i,r,o)}}},this.disablePerformanceTracking=function(){jn=!1},this.enableHeartBeatTimer=function(t){t=Math.max(t||15,5),Ue=1e3*t,null!==oi&&Nt()},this.disableHeartBeatTimer=function(){(Ue||ii)&&(nt.removeEventListener?(nt.removeEventListener("focus",pt),nt.removeEventListener("blur",Ct),nt.removeEventListener("visibilitychange",Tt)):nt.detachEvent&&(nt.detachEvent("onfocus",pt),nt.detachEvent("onblur",Ct),nt.detachEvent("visibilitychange",Tt))),Ue=null,ii=!1},this.killFrame=function(){nt.location!==nt.top.location&&(nt.top.location=nt.location)},this.redirectFile=function(t){"file:"===nt.location.protocol&&(nt.location=t)},this.setCountPreRendered=function(t){ze=t},this.trackGoal=function(t,e,n,i){Ae(function(){ke(t,e,n,i)})},this.trackLink=function(t,e,n,i){Ae(function(){we(t,e,n,i)})},this.getNumTrackedPageViews=function(){return ui},this.trackPageView=function(t,e,n){Kn=[],di=[],hi=[],G(vn)?Ae(function(){F(hn,gn,vn)}):Ae(function(){ui++,ne(t,e,n)})},this.disableBrowserFeatureDetection=function(){pi=!1},this.enableBrowserFeatureDetection=function(){pi=!0},this.trackAllContentImpressions=function(){G(vn)||Ae(function(){d(function(){var t=me(ht.findContentNodes());vi.pushMultiple(t)})})},this.trackVisibleContentImpressions=function(t,n){G(vn)||(e(t)||(t=!0),e(n)||(n=750),Me(t,n,this),Ae(function(){l(function(){var t=pe(ht.findContentNodes());vi.pushMultiple(t)})}))},this.
|
||
|
//# sourceMappingURL=/assets/source-maps/analytics.js.map
|
||
|
//# sourceURL=_assets/javascripts/analytics.js
|