PageSourceSearch

https://sdk.gig.goleadgrid.com/analytics/js/leadgrid-analytics-sdk…77accd2e97f5e6965b440d91dbdb8881&id=nyzUD47

js goleadgrid.com collected 2026-09-25 15:11:30 UTC 5,475 bytes, 1 lines download raw bytes

1(function(){"use strict";function a(i){const t=new Error(i);return t.source="ulid",t}const c="0123456789ABCDEFGHJKMNPQRSTVWXYZ",s=c.length,d=Math.pow(2,48)-1,v=10,T=16;function w(i){let t=Math.floor(i()*s);return t===s&&(t=s-1),c.charAt(t)}function y(i,t){if(isNaN(i))throw new Error(i+" must be a number");if(i>d)throw a("cannot encode time greater than "+d);if(i<0)throw a("time must be positive");if(Number.isInteger(Number(i))===!1)throw a("time must be an integer");let e,r="";for(;t>0;t--)e=i%s,r=c.charAt(e)+r,i=(i-e)/s;return r}function S(i,t){let e="";for(;i>0;i--)e=w(t)+e;return e}function C(i=!1,t){t||(t=typeof window<"u"?window:null);const e=t&&(t.crypto||t.msCrypto);if(e)return()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]/255};try{const r=require("crypto");return()=>r.randomBytes(1).readUInt8()/255}catch{}if(i){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return()=>Math.random()}throw a("secure crypto unusable, insecure Math.random not allowed")}function D(i){return i||(i=C()),function(e){return isNaN(e)&&(e=Date.now()),y(e,v)+S(T,i)}}const l=D();class _{constructor(){this.trackingServerUrl="https://d86zryi74yrxw.cloudfront.net"}send(t){const e=new Image,r=this.utf8ToBase64(JSON.stringify(t)).replace(/=/g,"");e.src=`${this.trackingServerUrl}?event=${r}`,e.style.display="none",document.body.appendChild(e),setTimeout(()=>document.body.removeChild(e),1e3)}utf8ToBase64(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(r,n){return String.fromCharCode(parseInt("0x"+n))}))}}const u="is_leadgrid_cookie_permit",h=1,b=365;function m(i=u){try{const t=localStorage.getItem(i);if(!t)return E(i)?m(i):null;const e=JSON.parse(t);return e.version!==h||Date.now()>e.exp?(f(i),null):e.value}catch(t){return console.error(t),null}}function g(i,t=u,e=b){try{const r=Date.now(),n={value:i,exp:r+e*24*60*60*1e3,version:h,consentedAt:r};localStorage.setItem(t,JSON.stringify(n)),k(t)}catch(r){console.error(r)}}function f(i=u){localStorage.removeItem(i),k(i)}function E(i){const t=I(i);return t==="true"||t==="1"?(g(!0,i),!0):t==="false"||t==="0"?(g(!1,i),!0):!1}function I(i){const e=document.cookie.split(";").map(r=>r.trim()).find(r=>r.startsWith(i+"="));return e?e.split("=")[1]:null}function k(i){document.cookie=`${i}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}class A{setCookie(t,e,r){const n=r?`; expires=${new Date(Date.now()+r*24*60*60*1e3).toUTCString()}`:"";document.cookie=`${t}=${e}${n}; path=/`}getCookie(t){const r=document.cookie.split(";").map(n=>n.trim()).find(n=>n.startsWith(t+"="));return r?r.split("=")[1]:null}getCookieValue(t,e){const r=this.getCookie(t);if(!r){const n=l();return this.setCookie(t,n,e),n}return r}}class x{constructor(){this.visitorId="",this.sessionId="",this.trackingDataArray=[],this.lastActivityTime=Date.now(),this.sessionTimeoutDuration=30*60*1e3,this.cookieManager=new A,this.beaconSender=new _,this.visitTime=new Date().toISOString(),this.activeTime=0,this.isPageVisible=!0,this.initializeTracking()}initializeTracking(){this.isTrackingPermitted()&&(this.startNewSession(),this.setupEventListeners(),this.setupActiveTimer(),this.extractUtmSource(),this.extractTrackingCodeId())}isTrackingPermitted(){let t="is_leadgrid_cookie_permit",e="opt_in";const r=document.querySelector("#leadgrid-analytics-tracker");if(r){const o=r.getAttribute("data-consent-cookie-name");o&&(t=o);const p=r.getAttribute("data-consent-type");p&&(e=p)}const n=m(t);return e==="opt_out"?n!==!1:n===!0}startNewSession(){this.trackingDataArray=[],this.visitorId=this.cookieManager.getCookieValue("_la_visitor_id",365),this.sessionId=this.cookieManager.getCookieValue("_la_session_id",1/48),this.visitTime=new Date().toISOString(),this.activeTime=0,this.isPageVisible=!0,this.lastActivityTime=Date.now(),this.prepareBaseTrackingData()}prepareBaseTrackingData(){this.trackingData={id:l(),visitor_id:this.visitorId,session_id:this.sessionId,tracking_code_id:"",url:window.location.href,page_title:document.title,action_type:"page_view",visit_time:this.visitTime,exit_time:"",view_duration:0}}setupEventListeners(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.isPageVisible=!1:(this.isPageVisible=!0,this.checkSessionTimeout())}),window.addEventListener("beforeunload",()=>{this.sendTrackingData()}),["mousedown","keydown","touchstart","scroll"].forEach(t=>{document.addEventListener(t,()=>{this.checkSessionTimeout()||(this.lastActivityTime=Date.now())},!0)})}checkSessionTimeout(){const t=Date.now()-this.lastActivityTime>=this.sessionTimeoutDuration;return t&&(this.sendTrackingData(),this.startNewSession()),t}setupActiveTimer(){setInterval(()=>{this.isPageVisible&&(this.activeTime+=1e3)},1e3)}extractUtmSource(){const e=new URLSearchParams(window.location.search).get("utm_source");e&&(this.trackingData.utm_source=e)}extractTrackingCodeId(){const t=document.querySelector("#leadgrid-analytics-tracker");if(!t)return;const e=t.getAttribute("src");if(!e)return;const r=e.split("?")[1],o=new URLSearchParams(r).get("id");o&&(this.trackingData.tracking_code_id=o)}addTrackingData(){this.trackingData.exit_time=new Date().toISOString(),this.trackingData.view_duration=this.activeTime,this.trackingDataArray.push(this.trackingData)}
1sendTrackingData(){this.activeTime<1e3||(this.addTrackingData(),this.beaconSender.send(this.trackingDataArray))}}document.addEventListener("DOMContentLoaded",()=>{new x})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.