api.pirsch.io Open in urlscan Pro
2a01:4f8:c011:5fa::1  Public Scan

URL: https://api.pirsch.io/pirsch.js
Submission: On March 21 via manual from RO — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(()=>{function d(t){let e=document.querySelector(t);if(!e)throw`Pirsch script ${t} tag not found!`;return e}function l(t){return A()||m(t)||!y(t)||R(t)}function f(t){return t?t=location.href.replace(location.hostname,t):t=location.href,t}function p(t){let e=document.referrer;return t&&(e=e.replace(location.hostname,t)),e}function A(){return navigator.doNotTrack==="1"||localStorage.getItem("disable_pirsch")}function m(t){return!t.hasAttribute("data-dev")&&(/^localhost(.*)$|^127(\.[0-9]{1,3}){3}$/is.test(location.hostname)||location.protocol==="file:")?(console.info("Pirsch is ignored on localhost. Add the data-dev attribute to enable it."),!0):!1}function y(t){try{let e=t.getAttribute("data-include"),o=e?e.split(","):[];if(o.length){let n=!1;for(let i=0;i<o.length;i++)if(new RegExp(o[i]).test(location.pathname)){n=!0;break}if(!n)return!1}}catch(e){console.error(e)}return!0}function R(t){try{let e=t.getAttribute("data-exclude"),o=e?e.split(","):[];for(let n=0;n<o.length;n++)if(new RegExp(o[n]).test(location.pathname))return!0}catch(e){console.error(e)}return!1}(function(){"use strict";let t=d("#pirschjs");if(l(t))return;let e=t.getAttribute("data-endpoint")||"https://api.pirsch.io/hit",o=t.getAttribute("data-code")||"not-set",n=t.getAttribute("data-domain")?t.getAttribute("data-domain").split(",")||[]:[],i=t.hasAttribute("data-disable-query"),h=t.hasAttribute("data-disable-referrer"),a=t.hasAttribute("data-disable-resolution"),g=t.getAttribute("data-dev");function c(){s(g);for(let r=0;r<n.length;r++)s(n[r])}function s(r){let b=p(r);r=f(r),i&&(r=r.includes("?")?r.split("?")[0]:r);let w=e+"?nc="+new Date().getTime()+"&code="+o+"&url="+encodeURIComponent(r.substring(0,1800))+"&t="+encodeURIComponent(document.title)+"&ref="+(h?"":encodeURIComponent(b))+"&w="+(a?"":screen.width)+"&h="+(a?"":screen.height),u=new XMLHttpRequest;u.open("GET",w),u.send()}if(history.pushState){let r=history.pushState;history.pushState=function(){r.apply(this,arguments),c()},window.addEventListener("popstate",c)}document.body?c():window.addEventListener("DOMContentLoaded",c)})();})();