THIS IS A DEMO STORE, YOU WON'T BE CHARGED. U:Test P:funkytest111@

Documentation

GTM and GA4 support

Enable GTM and GA4 support

It is possible with script injection from netlify or alled from Your fork. Below netlify script injection is used to place the scripts in correct folders matching their respective positions.

Order matters, keep it as follows, change the GTM-XXX to your GTM id.

1. before </head> - TCF

<script>

    <!-- Enabled tcf support for Google tag -->
    window ['gtag_enable_tcf_support'] = true;  

</script>

2. before </head> - DCV

<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

  // Restrictive defaults except analytics
  gtag("consent", "default", {
    ad_storage: "denied",
    ad_user_data: "denied",
    ad_personalization: "denied",
    analytics_storage: "granted",   // ✅ granted by default
    functionality_storage: "granted",
    personalization_storage: "denied",
    security_storage: "granted",
    wait_for_update: 2500,
  });

  gtag("set", "ads_data_redaction", true);
  gtag("set", "url_passthrough", true);

  // Restore saved preferences if user decided before
  (function() {
    function getCookie(name) {
      const value = ("; " + document.cookie).split("; " + name + "=");
      if (value.length === 2) return decodeURIComponent(value.pop().split(";").shift());
    }

    const saved = getCookie("cookie_v2");
    if (saved) {
      try {
        const consent = JSON.parse(saved);
        gtag("consent", "update", consent);
        window.dataLayer.push({ event: "consent_update", consent });
      } catch(e) {
        console.warn("Invalid consent cookie:", e);
      }
    }
  })();
</script>



3. before </head> - GTM

<!-- Google Tag Manager -->
<script>(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-XXX');</script>
<!-- End Google Tag Manager -->

4. before </body> - GTMNS

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

superfunky theme

Stay up to date with our progress. Get notified when the product drops.