PageSourceSearch

https://www.canadagoose.com/cdn/shop/t/19/assets/sfmc-pixel.js?v=99249336204922943951790259853

js canadagoose.com collected 2026-09-24 15:24:44 UTC 4,473 bytes, 1 lines download raw bytes

1(()=>{"use strict";const e="sfmc_bcid",t="sfmc_bcid",n=2592e6,o="C0004",r="sfmc_product_codes",c="sfmc_product_codes";function a(){const e=window.OnetrustActiveGroups;if("string"==typeof e&&e.length>0)return e.split(",").map(e=>e.trim()).includes(o);const t=document.cookie.match(/(?:^|;\s*)OptanonConsent=([^;]*)/);if(!t)return!1;try{return decodeURIComponent(t[1]).includes(`${o}:1`)}catch{return!1}}function i(o){try{localStorage.setItem(e,JSON.stringify({value:o,expiry:Date.now()+n}))}catch{}if(!a())return;const r=new Date(Date.now()+n).toUTCString();document.cookie=`${t}=${encodeURIComponent(o)};expires=${r};path=/;SameSite=Lax;Secure`}let s;function u(){s=void 0;try{localStorage.removeItem(e)}catch{}try{sessionStorage.removeItem(r)}catch{}document.cookie=`${t}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;SameSite=Lax;Secure`,document.cookie=`${c}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;SameSite=Lax;Secure`}async function d(){if(!a())return u(),null;if(void 0!==s)return s;const t=new URLSearchParams(window.location.search).get("bcid");if(t)return i(t),s=t,t;const n=window.Theme?.customer;if(n?.isLoggedIn){const e=n.unifiedCustomerId,t=n.email;if(!e)return console.warn("[sfmc-pixel] unified_customer_id metafield missing — BCID not sent for logged-in user"),null;const o=await async function(e){const t=(new TextEncoder).encode(e),n=await window.crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map(e=>e.toString(16).padStart(2,"0")).join("")}(`${e}_${t}`.toLowerCase());return i(o),s=o,o}const o=function(){try{const t=localStorage.getItem(e);if(!t)return null;const n=JSON.parse(t);return n?.value&&n?.expiry?Date.now()>n.expiry?(localStorage.removeItem(e),null):n.value:null}catch{return null}}();return s=o,o}function l(){const e=(window.Theme?.countryIsoCode??"").toLowerCase(),t=(document.documentElement.lang??"").split("-")[0].toLowerCase();return e&&t?`${e}_${t}`:null}async function m(){const e=await d(),t=l(),n={market:window.Theme?.market??null,currency:window.Theme?.currency??null,presentmentCurrency:window.Theme?.presentmentCurrency??null},o=function(){const e=window.Theme?.template?.name;if("product"===e){const e=document.querySelector("[data-sfmc-product-code]")?.dataset?.sfmcProductCode;return{pageType:"product",productCode:e??null}}if("collection"===e){const e=document.querySelector("[data-sfmc-collection-handle]")?.dataset?.sfmcCollectionHandle;return{pageType:"collection",collectionHandle:e??null}}return"search"===e?{pageType:"search",searchQuery:new URLSearchParams(window.location.search).get("q")??null}:{pageType:e??"other"}}();window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"sfmc_page_view",sfmc:{bcid:e,locale:t,...n,...o}})}window._etmc=window._etmc||[],window.sfmcClearBcid=u;let p=!1;document.addEventListener("DOMContentLoaded",()=>{p=a(),m()});const w=window.OptanonWrapper;function f(e,...t){const n=new Set(t.map(e=>e.toLowerCase())),o=e.options_with_values?.find(e=>n.has(e.name.toLowerCase()));return o?.value??null}function y(e){return f(e,"Color","Colour")}window.OptanonWrapper=function(){"function"==typeof w&&w(),!p&&a()&&m().catch(e=>{console.error("[sfmc-pixel] OptanonWrapper push failed",e)})},document.addEventListener("cart:updated",e=>{const t=e.detail?.cart,n=e.detail?.added_item?.variant_id,o=document.querySelector("[data-sfmc-product-code]")?.dataset.sfmcProductCode;!function(e,t){if(!e||!t)return;if(!a())return;let n={};try{n=JSON.parse(sessionStorage.getItem(r)||"{}")}catch{}const o=`v_${e}`;delete n[o],n[o]=t;const i=Object.keys(n);i.length>20&&i.slice(0,i.length-20).forEach(e=>delete n[e]);try{sessionStorage.setItem(r,JSON.stringify(n))}catch{}const s=encodeURIComponent(JSON.stringify(n)),u=new Date(Date.now()+6048e5).toUTCString();document.cookie=`${c}=${s};expires=${u};path=/;SameSite=Lax;Secure`}(n,o),async function(e){if(!a())return;const t=await d(),n=l(),o=function(e){if(!e?.items?.length)return[];const t=function(){try{return JSON.parse(sessionStorage.getItem(r)||"{}")}catch{return{}}}();return e.items.map(e=>{const n=t[`v_${e.variant_id}`]??null,o="string"==typeof e.sku&&""!==e.sku.trim()?e.sku:null;return{item:n??o??String(e.product_id),quantity:String(e.quantity),price:(e.final_price/100).toFixed(2),unique_id:String(e.variant_id),color:y(e),size:f(e,"Size")}})}(e);window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"sfmc_cart_updated",sfmc:{bcid:t,locale:n,cart:o}})}
1(t).catch(()=>{})})})();

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.