analytics/priv/tracker/js/plausible.hash.local.manual.js
2021-10-21 13:57:30 +02:00

1 line
858 B
JavaScript

!function(){"use strict";var a=window.location,r=window.document,e=window.localStorage,o=r.currentScript,w=o.getAttribute("data-api")||new URL(o.src).origin+"/api/event",l=e&&e.plausible_ignore;function n(e,n){var t,i;window._phantom||window.__nightmare||window.navigator.webdriver||window.Cypress||("true"!=l?((t={}).n=e,t.u=a.href,t.d=o.getAttribute("data-domain"),t.r=r.referrer||null,t.w=window.innerWidth,n&&n.meta&&(t.m=JSON.stringify(n.meta)),n&&n.props&&(t.p=JSON.stringify(n.props)),t.h=1,(i=new XMLHttpRequest).open("POST",w,!0),i.setRequestHeader("Content-Type","text/plain"),i.send(JSON.stringify(t)),i.onreadystatechange=function(){4==i.readyState&&n&&n.callback&&n.callback()}):console.warn("Ignoring Event: localStorage flag"))}var t=window.plausible&&window.plausible.q||[];window.plausible=n;for(var i=0;i<t.length;i++)n.apply(this,t[i])}();