// COMPLETE FRIGHTMARE COMPOUND SCRIPT - TRACKING + STYLING - MOBILE OPTIMIZED // Based on working Pumpkin Nights framework with inverted colors (red theme) // ======================================================== (function() { 'use strict'; // ======================================== // PART 1: MARKETING & ANALYTICS TRACKING // ======================================== // 1. GOOGLE ANALYTICS 4 window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-KLRX320MC3'); // Load GA4 script const gaScript = document.createElement('script'); gaScript.async = true; gaScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-KLRX320MC3'; document.head.appendChild(gaScript); // 2. GOOGLE TAG MANAGER (function(w,d,s,l,i){ w[l]=w[l]||[]; w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'}); var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:''; j.async=true; j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NGFP4GZ'); // 3. FACEBOOK PIXEL !function(f,b,e,v,n,t,s){ if(f.fbq)return; n=f.fbq=function(){ n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments) }; if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0'; n.queue=[]; t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t,s) }(window, document,'script','https://connect.facebook.net/en_US/fbevents.js'); fbq('init', '239831573081641'); fbq('track', 'PageView'); // 4. SNAPCHAT PIXEL (function(e,t,n){ if(e.snaptr)return; var a=e.snaptr=function(){ a.handleRequest?a.handleRequest.apply(a,arguments):a.queue.push(arguments) }; a.queue=[]; var s='script'; r=t.createElement(s);r.async=!0; r.src=n; var u=t.getElementsByTagName(s)[0]; u.parentNode.insertBefore(r,u); })(window,document,'https://sc-static.net/scevent.min.js'); snaptr('init', 'ebb9d7ef-1548-43d3-a35c-a0ab6e54a6a7', { 'user_email': '__INSERT_USER_EMAIL__' }); snaptr('track', 'PAGE_VIEW'); // 5. TIKTOK PIXEL !function (w, d, t) { w.TiktokAnalyticsObject=t; var ttq=w[t]=w[t]||[]; ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"]; ttq.setAndDefer=function(t,e){ t[e]=function(){ t.push([e].concat(Array.prototype.slice.call(arguments,0))) } }; for(var i=0;i