1// PostHog Analytics Initialization 2// Shared script for all pages 3 4// Track whether PostHog is actually initialized 5window.POSTHOG_ENABLED = false; 6 7// Initialize PostHog with environment variables or fallback 8const posthogKey = window.POSTHOG_KEY || null; 9const posthogHost = window.POSTHOG_HOST || 'https://app.posthog.com'; 10 11if (posthogKey) { 12 // Load PostHog library only when we have a key 13 !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]);t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys getNextSurveyStep onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]); 14 15 posthog.init(posthogKey, { 16 api_host: posthogHost, 17 person_profiles: 'identified_only', 18 capture_pageview: true, 19 capture_pageleave: true 20 }); 21 22 window.POSTHOG_ENABLED = true; 23 24 // Track page view 25 posthog.capture('page_view', { 26 page: window.location.pathname, 27 title: document.title, 28 referrer: document.referrer 29 }); 30}
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.