This demo shows how the cookie guard automatically blocks analytics and marketing cookies until you give consent, without needing to modify your scripts!
Click the buttons below to test automatic blocking of cookies and scripts.
The cookie guard intercepts ALL cookie writes and blocks these patterns:
_ga, _gid, _gat_* - Google Analytics_gcl_au - Google Click Identifier__utm* - Google Analytics UTM tracking_uet - Microsoft UET_fbp - Facebook Pixelfr - Facebook trackinghubspotutk - HubSpot trackingintercom-* - Intercom chattawk* - Tawk.to live chatdatadog* - Datadog analyticsYou can use your existing analytics/marketing code. The guard automatically blocks cookies based on patterns.
Open your browser console (F12) to see blocking messages:
Cookie guard installed Cookie blocked until consent: _ga Cookie blocked: _fbp
Even if you include Google Analytics normally, its cookies will be blocked:
<!-- This will work, but cookies won't be set until consent -->
<script>
gtag('config', 'UA-XXXXXXXXX-X');
// _ga cookie attempts will be blocked!
</script>
<!-- Or with data-category (recommended) -->
<script type="text/plain" data-category="analytics">
gtag('config', 'UA-XXXXXXXXX-X');
// Only loads after consent
</script>
Test the consent system: