CookieConsent consent integration
This guide provides detailed steps for integrating the CookieConsent open-source consent management tool with Tealium iQ.
CookieConsent is a flexible, open source consent management tool that can be enforced with Tealium consent integrations. This guide outlines how to configure CookieConsent using consent integration in Tealium iQ. Combined with consent integrations, CookieConsent offers a better experience and additional features not found in the Consent Manager, including:
- A/B testing for consent banners.
- Robust enforcement and queue system to ensure no un-consented data is tracked.
- Better accessibility support.
- A block-by-default framework to help prevent issues caused by user errors. For more information, see Handling conflicts in enforcement conditions.
- Collect (and similar tags) can be set to refire, triggering both “necessary” and “targeting” tracking on the server-side with clearly marked events to avoid duplicate tracking.
Comparing CookieConsent with CMP integrations
CookieConsent offers flexibility and control without introducing a new vendor. However, it does not support IAB TCF or provide legal guidance. Use the summary below to help you compare CookieConsent (with Tealium) to commercial consent management platforms (CMPs) integrated into Tealium iQ.
Capability | CookieConsent | CMP Integration |
---|---|---|
Easy to enforce with Tealium iQ | ✓ | ✓ |
Tealium Consent Register makes consent decisions accessible and updates easy to subscribe to | ✓ | ✓ |
Offers consent logging and storage | ✓ | ✓ |
Easy to customize for your company’s design requirements | ✓ | ? |
Easy to tailor to your company’s legal requirements | ✓ | ? |
Easily meet web accessibility standards (WCAG) | ✓ | ? |
Offers vendor-specific opt-outs | ✓ | ? |
No new vendor onboarding or reviews required (hosted on Tealium’s content delivery network) | ✓ | ✗ |
No additional subscription required (storing consent logs or accessing support may incur additional costs) | ✓ | ✗ |
Supports IAB TCF, useful for websites that show on-site advertising. | ✗ | ✓ |
Offers pre-configured settings based on privacy regulations such as GDPR or CCPA | ✗ | ✓ |
Offers legal guidance | ✗ | ✓ |
Capabilities marked with ?
vary based on the specific CMP provider. Some CMPs support these features such as accessibility support or vendor-specific opt-outs, while others may not. Review the documentation of your CMP to confirm support for these features.
CookieConsent does not support the IAB Transparency and Consent Framework (TCF) required by some publishers and advertising platforms. If your organization requires IAB TCF support or a Google-certified CMP, use an alternative solution. For more information, see CookieConsent: Is it the right tool for you? and The IAB’s Transparency and Consent Framework and Tealium.
Who’s this for?
CookieConsent is a consent management tool that provides a flexible, open source approach to managing user consent. Unlike a full CMP, which typically includes additional features such as policy enforcement, analytics, and vendor compliance management, CookieConsent is designed to be a transparent, opinion-free tool that allows businesses to implement consent controls according to their specific needs.
If you need a customizable and developer-friendly tool that seamlessly integrates with Tealium, CookieConsent is a great option. However, if you require a comprehensive CMP solution, including IAB Framework support or Google-certified consent management, you will need an alternative solution.
Requirements
Creating a CookieConsent consent integration requires the following:
- Tealium iQ Tag Management
- Tealium Consent Integrations
Why use it?
CookieConsent replaces Tealium Consent Manager for customers who seek a robust, non-commercial consent management tool. It delivers a dependable consent capture layer with flexible and robust enforcement, which can be tailored to meet complex compliance needs.
Categories, services, and purposes explained
CookieConsent V3 supports both categories and service-level consent options:
- Categories are broad groups of purposes for data processing, such as
necessary
orfunctional
. These define high-level groupings of data use cases. - Services are specific vendors or sub-purposes within a category, such as
necessary-vendor1
. Services allow for more granular consent settings by defining individual entities or distinct purposes within a category.
Service names combine the category name with either the vendor or sub-purpose name using a hyphen prefix for transparency. For example, within a necessary
category, services might include necessary-vendor1
or necessary-subpurpose1
.
Example use cases
- Vendor-based service: In the
analytics
category, an example of a service isanalytics-google_analytics
, representing a specific vendor providing analytics capability. - Sub-purpose-based service: In the
functional
category, an example of a service isfunctional-session_tracking
, representing a sub-purpose for functional cookies related to tracking user sessions.
If services are defined within a category, the category itself is no longer available for mapping. For example, if the necessary
category includes services such as necessary-vendor1
and necessary-vendor2
, only those specific services are available for mapping.
Consent behavior:
- In opt-in mode, both the category and its services are allowed.
- In opt-out mode, all except
targeting
are allowed.
Integration steps
Complete the following steps to set up the CookieConsent integration in Tealium iQ:
- Configure the CookieConsent v3 Loader extension.
- Configure the CookieConsent v3 Logging extension.
- Create a CookieConsent v3 integration and enforcement rule.
- Create purpose group.
- Save and publish Tealium iQ profile.
- Test and troubleshoot.
Step 1: Configure the CookieConsent v3 Loader extension
Use the CookieConsent v3 Loader extension to load the CookieConsent library and apply your configuration for categories, layout, language, and behavior. This step ensures that the consent banner and modal appear correctly on your site.
For information on how to configure the extension, see CookieConsent v3 Loader extension
Step 2: Configure the CookieConsent v3 Logging extension
The CookieConsent v3 Logging extension captures consent preferences and sends that information to a specified endpoint. This extension listens for consent updates from the CookieConsent v3 banner and sends a JSON payload with the decision details. You can configure the destination by updating the extension configuration code.
For information on how to configure the extension, see CookieConsent v3 Logging extension.
Step 3: Create a CookieConsent v3 integration and enforcement rule
Set up the CookieConsent v3 consent integration and define rules to enforce consent. This step links CookieConsent to your consent logic in Tealium iQ, ensuring that tags fire only when the user has given appropriate consent.
-
Go to the iQ Tag Management > Consent Integrations section.
-
Click Add Integration.
-
Enter a name for the integration that clearly identifies its purpose.
-
Select CookieConsent v3 from the vendor drop-down list.
-
Click Next.
-
Define appropriate enforcement rules. Include exemptions as needed for specific use cases.
Avoid overlapping enforcement rules with other integrations or exemptions to prevents conflicts. For more information, see Handling conflicts in enforcement conditions.
-
Click Next.
-
Select a publish location and click Next.
Step 4: Create purpose group
If one doesn’t already exist, create a purpose group to define and map consent categories and services captured by CookieConsent to tags in Tealium iQ.
- Select + New Purpose Group from the purpose group drop-down list.
- Click Create Purpose Group.
- Enter a name and description.
- Click Next.
- Create purposes:
- From your
ccConfig.categories
in the CookieConsent v3 Loader extension configuration code, add a purpose for each service or vendor. Only add a category-level purpose if no services or vendors exist in that category. - For each purpose, use the service key within the category such as
necessary-necessary_vendor1
to map consent decisions in the purpose group. Only use a category key such asnecessary
if no services are defined in that category.
- From your
- Click the Tealium iQ Purpose tab.
- To ensure Tealium iQ always loads, assign Tealium iQ to a purpose that users cannot opt out such as Strictly Necessary.
- Click the Map Tags tab.
- Assign each tag to an appropriate purpose.
- Enable tag refiring if you want tags, such as the Tealium Collect tag, to refire when consent is updated in the same event.
- Click Save to save the purpose group.
- Click Save to save your consent integration.
- Save and publish the Tealium iQ profile to generate the template for your new integration.
Step 5: Save and publish Tealium iQ profile
Save and publish the Tealium iQ profile to the Dev environment and test before publishing to the Prod environment. You have now successfully configured CookieConsent with Tealium iQ Consent Integration.
Test and troubleshoot
Use the Tealium Tools Environment Switcher to preview your implementation across environments and verify that your consent integration is working as expected.
Verify your consent integration setup
- Visit your site and accept tracking.
- Open the Developer Tools JavaScript console.
- Use the following commands in your browser’s Developer Tools to test:
CookieConsent.show(true)
to display the banner.CookieConsent.showPreferences(true)
to show the preferences dialog.
- Validate the following:
- The banner and preference dialog display correctly.
- The consent decision is stored in the
cc_cookie
cookie. - Use the Consent Register in Developer Tools to monitor consent activity.
- Only tags with valid consent are allowed to fire.
Clear the CookieConsent cookie (cc_cookie
by default) between decisions to reset consent status.
For more information about validating enforcement and debugging issues, see Validate and debug Consent Integrations.
Tests
For a suite of end-to-end integration tests for CookieConsent and Tealium Consent Integration, see CookieConsent + Tealium iQ - End-to-end integration tests.
Additional resources
- Consent integration: Reference for Consent Integration setup.
- CookieConsent v3.1.0 Playground: Explore configurations and styles.
- CookieConsent: UI Customization: Guide for UI customization.
This page was last updated: June 26, 2025