You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/priv/tracker/js/plausible.hash.manual.js

1 line
1022 B
JavaScript

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