Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cookiechimp.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Add your website’s CookieChimp JS snippet in the <head> tag of your HTML.
Do not add our HTML code via Google Tag Manager since we set the default consent states before Google Tag Manager runs.
The CookieChimp script needs to be added at the top of the <head> section, so that it can run first, in order to ensure other scripts are only run based on consent. If other scripts are added before, they may set cookies and other storage items before consent is granted.
<script src="https://cookiechimp.com/widget/abc123.js"></script>
You need to replace abc123 with your website’s unique CookieChimp ID.

How do I block tags with Google Tag Manager?

1

Enable Google Consent Mode

Navigate to “Integrations” from the sidebar and enable the Google Consent Mode integration.Enable GCM
2

Add/Edit Tag

Create or update a tag and add an additional consent check so the tag only fires once the matching vendor has consent.Navigate to “Advanced Settings” > “Consent Settings”. Select “Require additional consent for tag to fire” and enter the name of the category or service that the tag needs to fire on.Consent Settings
3

Add a custom trigger

This is required to listen for changes in consent state. This event will be triggered by CookieChimp on page load and when the user changes their consent settings.Add TriggerChoose “Custom Event”Choose Custom EventSet up the custom trigger with event name cookiechimp_consent_update and save the tag.Create custom trigger
This tag is now set up and will only fire when the required consent is granted. GTM supports 7 different default consent types. CookieChimp maps these Google consent types into the following categories:
CookieChimp Category IDGoogle Consent Type
essentialfunctionality_storage, security_storage
marketingad_storage, ad_user_data, ad_personalization
analyticsanalytics_storage
personalizationpersonalization_storage
These categories are setup by default. When a user opts-in to a consent category or a Google service in the category is consented to, the linked Google consent type will change from ‘denied’ to ‘granted’ and vice versa. Apart from the default 7 consent types, we will also send the consent state of your services to Google. For example, when a user consents to a service named “Hotjar”, the consent state for this service is updated as ‘granted’. This is what allows you to use the vendor name directly in a tag’s “Require additional consent for tag to fire” setting (the recommended approach in the Add/Edit Tag step), so the tag only fires when that specific vendor has been granted consent and not just the broader category.