Add your website’s CookieChimp JS snippet in theDocumentation 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.
<head> tag of your HTML, before the Adobe Launch embed code.
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.abc123 with your website’s unique CookieChimp ID and the Adobe Launch URL with the embed code from your Launch property’s Environments page.
How does CookieChimp work with Adobe Launch?
Adobe Launch (now Adobe Experience Platform Tags) does not have a native consent mode like Google Tag Manager does, so consent is enforced inside each rule using a Data Element and a rule condition. CookieChimp exposes two things you’ll wire into Launch:window.cookieChimpConsentString— a comma-separated string of the categories and services the visitor has consented to, e.g.essential,analytics,marketing,Google Analytics,Hotjar,Facebook Pixel. You read this from a Data Element.cc:consentStringUpdated— a window event that fires once consent has been granted and again every time the visitor changes their preferences. You listen for it from a rule’s event.
How do I block tags with Adobe Launch?
Create a Data Element for the consent string
In your Launch property, go to Data Elements and click Add Data Element.This Data Element returns the latest comma-separated list of consented categories and vendors, wrapped with leading and trailing commas. You’ll reference it as
- Name:
CookieChimp Consent String - Extension: Core
- Data Element Type: Custom Code
- Storage Duration: None (read it fresh on every reference)
%CookieChimp Consent String% from your rule conditions.Add a custom event to listen for consent updates
Open the rule for the tag you want to gate (or create a new rule), and add an Event of type Custom Code under the Core extension.
- Listen for consent on load and on change
- Only fire on consent changes
Use this when you want the rule to run as soon as the page loads (if consent has already been granted) and again whenever the visitor updates their preferences.
trigger() is a function Adobe Launch injects into Custom Code events. Calling it tells Launch to evaluate the rule’s conditions and run its actions.The
cc:consentStringUpdated event is dispatched on window after CookieChimp has read the visitor’s choices and rebuilt the consent string, so it’s safe to read window.cookieChimpConsentString from inside the listener.Add a condition to gate the tag on consent
Add a Condition to the rule of type Value Comparison under the Core extension.
- Recommended
- Alternative
- Custom Code condition
Gate the tag on a specific vendor.
- Left operand:
%CookieChimp Consent String% - Operator: Contains
- Right operand: the exact vendor name as it appears in your CookieChimp Vendor Library, wrapped with leading and trailing commas, e.g.
,Google Analytics,,,Hotjar,, or,Facebook Pixel,.
Save, build, and publish
Save the rule, add it to a Library, build the library, and publish to your environment as you normally would in Launch.Repeat the event and condition steps for any other rule that loads a tag requiring consent. The Data Element only needs to be created once and can be reused across every rule.
- Wait until CookieChimp has determined the visitor’s consent state.
- Only fire when the required category or vendor is in the consent string.
- Re-evaluate automatically whenever the visitor updates their preferences from the banner or privacy trigger.
How do I debug my Adobe Launch setup?
Adobe Launch ships with a debug mode that logs every rule evaluation to the browser console. Enable it by running the following in your DevTools console:- Confirm the Data Element returns a non-empty string after consent is granted.
- Confirm the vendor or category name in your condition matches what appears in the consent string exactly.
- Confirm the CookieChimp snippet is loaded before the Launch embed code in your
<head>.
What about the Adobe Web SDK and Consent Mode?
If you are using the Adobe Experience Platform Web SDK (alloy), it has its own consent command that accepts an IAB TCF string or the Adobe consent standard. The pattern above — reading window.cookieChimpConsentString from a Data Element and listening for cc:consentStringUpdated — works for any Web SDK rule too: call alloy("setConsent", ...) from the rule’s action, mapping CookieChimp’s categories to the consent object Adobe expects.
If you need help wiring CookieChimp into a specific Adobe Web SDK setup, get in touch and we’ll work through it with you.