This is a forked project from GlowCookies. I've added a few improvements on top of the original that are explained below.
Simple and full automated cookies banner for any website. Complies with the new European regulations. Activate and deactivate Google Analytics, cookies whenever the user wishes, with just one click.
In short, the new features were added to keep using Google Analytics with the anonymize_ip
feature and to be properly used in frameworks more efficiently:
glowCookies
is a namespace- Minify version of the CSS and JS library
- Stored the selected value in cookies (Accept or Decline)
- Settings saved for
365 + 31
days - If a user declines the use of cookies, Google Analytics will be installed with IP Anonymization, which complies with the GDPR requirements
- Google Analytics, and Spanish and English only (we can add any language whenever)
Add this code to your html <head>
or <body>
tag.
<script src="https://cdn.jsdelivr.net/gh/a133xz/GlowCookies@master/dist/glowCookies.js"></script>
<script>
glowCookies.start("en", {
style: 1,
analytics: "G-FH87DE17XF",
policyLink: "https://link-to-your-policy.com",
});
</script>
For more information about the configuration, please follow the original documentation.
Thank you to the original author for this amazing javascript library.