{"version":3,"file":"AnalyticsLoader.Cm7Lcb0_.mjs","names":[],"sources":["https:/framerusercontent.com/modules/WLrvaAg5dSc2SR3kWt46/bSHMYVsh8hvfb9SLtxxg/AnalyticsLoader.js"],"sourcesContent":["// AnalyticsLoader — site-wide gtag bootstrap for Google Ads + GA4 funnel events.\n// Drop this onto every page that should report events (or once on a global layout\n// frame). It loads gtag.js, configures the AW- (Google Ads) account, and optionally\n// configures a GA4 property when a measurement ID is provided. Renders nothing.\n//\n// Events fired elsewhere via window.gtag('event', name, payload) flow to both.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";/**\n * Analytics Loader (Google Ads + GA4)\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerDisableUnlink\n */export default function AnalyticsLoader(props){const{googleAdsId=\"AW-17972770633\",ga4MeasurementId=\"G-DLSHE63J0F\",debug=false}=props;useEffect(()=>{if(typeof window===\"undefined\")return;// The primary tag id determines the gtag.js script URL.\nconst primaryId=ga4MeasurementId||googleAdsId;if(!primaryId)return;const scriptSelector=`script[data-parlay-gtag=\"${primaryId}\"]`;if(!document.querySelector(scriptSelector)){const s=document.createElement(\"script\");s.src=`https://www.googletagmanager.com/gtag/js?id=${primaryId}`;s.async=true;s.setAttribute(\"data-parlay-gtag\",primaryId);document.head.appendChild(s);}const w=window;w.dataLayer=w.dataLayer||[];function gtag(){// eslint-disable-next-line prefer-rest-params\nw.dataLayer.push(arguments);}w.gtag=w.gtag||gtag;// Set initial timestamp once\nif(!w.__parlayGtagInit){w.__parlayGtagInit=true;w.gtag(\"js\",new Date);}if(googleAdsId){w.gtag(\"config\",googleAdsId,debug?{debug_mode:true}:{});}if(ga4MeasurementId){w.gtag(\"config\",ga4MeasurementId,debug?{debug_mode:true}:{});}if(debug){// eslint-disable-next-line no-console\nconsole.log(\"[Analytics] loaded\",{googleAdsId,ga4MeasurementId});}},[googleAdsId,ga4MeasurementId,debug]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"none\"}});}addPropertyControls(AnalyticsLoader,{googleAdsId:{type:ControlType.String,title:\"Google Ads ID\",defaultValue:\"AW-17972770633\",placeholder:\"AW-XXXXXXXXXX\"},ga4MeasurementId:{type:ControlType.String,title:\"GA4 Measurement ID\",defaultValue:\"G-DLSHE63J0F\",placeholder:\"G-XXXXXXXXXX\"},debug:{type:ControlType.Boolean,title:\"Debug\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnalyticsLoader\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AnalyticsLoader.map"],"mappings":"yLAYG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,cAAY,iBAAiB,mBAAiB,eAAe,QAAM,IAAO,EAIxB,OAJ8B,MAAc,CAAC,GAAU,IAAS,OAAY,OACtL,IAAM,EAAU,GAAkB,EAAY,GAAG,CAAC,EAAU,OAAO,IAAM,EAAe,4BAA4B,EAAU,IAAI,GAAG,CAAC,SAAS,cAAc,CAAc,EAAE,CAAC,IAAM,EAAE,SAAS,cAAc,QAAQ,EAAE,EAAE,IAAI,+CAA+C,IAAY,EAAE,MAAM,GAAK,EAAE,aAAa,mBAAmB,CAAS,EAAE,SAAS,KAAK,YAAY,CAAC,CAAE,CAAC,IAAM,EAAE,EAAO,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,SAAS,GAAM,CAC1a,EAAE,UAAU,KAAK,SAAS,CAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EACxC,EAAE,mBAAkB,EAAE,iBAAiB,GAAK,EAAE,KAAK,KAAK,IAAI,IAAI,GAAM,GAAa,EAAE,KAAK,SAAS,EAAY,EAAM,CAAC,WAAW,EAAI,EAAE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