PageSourceSearch

https://www.examenbateau.com/assets/segment-analytics-97efc38ddebf…26e0f681a8e3dd985a656fa389288336c752ac21.js

js examenbateau.com collected 2026-09-25 04:50:49 UTC 2,779 bytes, 1 lines download raw bytes

1!function(){let e,t=null;window.StimulusApplication?e=window.StimulusApplication:(e=Stimulus.Application.start(),window.StimulusApplication=e);e.router.modules.some(e=>"segment-analytics"===e.identifier)||e.register("segment-analytics",class extends Stimulus.Controller{static values={enabled:Boolean,event:String,properties:Object,environment:String};connect(){this.shouldLoadSegment()&&(this.loadSegmentLibrary(),this.trackPageView()),"/site/logout"===window.location.pathname&&this.reset()}trackPageView(){if(this.isTestEnvironment())return;const e=t||document.referrer;t=window.location.href,window.analytics?.page?.({referrer:e},{context:{page:{referrer:e}}})}shouldLoadSegment(){return"undefined"!=typeof KELP&&KELP.env&&!0===KELP.env.segmentEnabled}isTestEnvironment(){return"undefined"!=typeof jest||window.navigator?.userAgent?.includes("jsdom")}loadSegmentLibrary(){if(this.isTestEnvironment())return;const e=KELP.env.segmentWriteKey,t="analytics";window[t]||(window[t]=[]);const n=window[t];if(!n.initialize)if(n.invoked)console.error?.("Segment snippet included twice.");else{n.invoked=!0,n.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","screen","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],n.factory=function(e){return function(){if(window[t].initialized)return window[t][e].apply(window[t],arguments);const i=Array.prototype.slice.call(arguments);if(["track","screen","alias","group","page","identify"].includes(e)){const e=document.querySelector("link[rel='canonical']");i.push({__t:"bpc",c:e?.getAttribute("href"),p:location.pathname,u:location.href,s:location.search,t:document.title,r:document.referrer})}return i.unshift(e),n.push(i),n}};for(let e=0;e<n.methods.length;e++){const t=n.methods[e];n[t]=n.factory(t)}n.load=function(e,i){const a=document.createElement("script");a.type="text/javascript",a.async=!0,a.setAttribute("data-global-segment-analytics-key",t),a.src=`${location.origin}/analytics.js/v1/${e}/analytics.min.js`;const o=document.getElementsByTagName("script")[0];o?.parentNode?o.parentNode.insertBefore(a,o):document.head.appendChild(a),n._loadOptions=i},n._writeKey=e,n.load(e,{integrations:{"Segment.io":{apiHost:`${location.host}/analytics-events/v1`}}})}}trackEvent(e){if(!this.hasEventValue)return;const t=this.hasPropertiesValue?this.propertiesValue:{},n=this.eventValue;window.analytics?.track&&window.analytics.track(n,t)}identifyUser(e){if(!this.hasEventValue)return;const t=this.hasPropertiesValue?this.propertiesValue:{},n=this.eventValue;window.analytics?.identify&&window.analytics.identify(n,t)}reset(){window.analytics?.reset&&window.analytics.reset()}})}();

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.