CookieConsent + Tealium iQ Consent Integration
This guide provides detailed steps for integrating the CookieConsent open-source consent management platform (CMP) with Tealium iQ.
This integration is available without a feature flag, unlike most Early Access programs. We recommend thorough testing, as with any custom implementation. For further assistance, contact your Tealium Support representative.
CookieConsent is a flexible, open-source CMP integrated with Tealium’s 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 unconsented 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.
Like the current Consent Manager, IAB Framework - TCF is not supported by CookieConsent. Customers requiring an IAB TCF CMP or a Google-certified CMP will need to use an alternative solution. For more details, see CookieConsent: Is CookieConsent the right tool for you?.
Why use it?
CookieConsent is set to replace Tealium’s Consent Manager for customers who seek a robust, non-commercial CMP. It delivers a dependable consent capture layer with flexible and robust enforcement, tailored to meet complex compliance needs.
How it will be released
- The integration template will eventually be pre-built into Tealium iQ.
- Extensions will appear pre-filled in the privacy tab for easier customization.
- Default purpose groups may include sample logic from the templates.
Categories, services, and purposes explained
CookieConsent V3 supports both categories and service-level consent options:
- Categories: Broad groups like
necessary
orfunctional
. - Services: Specific vendors or sub-purposes within categories such as
necessary-necessary_vendor1
.
To simplify, categories and service names are merged with a hyphen prefix for transparency. For example:
- A
necessary
category contains servicesnecessary_vendor1
andnecessary_vendor2
. - In GDPR mode, both the category and its services are allowed.
- In California mode, all except “targeting” are allowed.
Requirements
Before proceeding, ensure you have the following:
- Tealium iQ Tag Management
- Tealium Consent Integrations
Integration steps
Complete the following steps to set up the CookieConsent integration in Tealium iQ:
- Download the required files
- Create a custom consent integration and enforcement rule
- Create purpose group
- Set up the template
- Set up the injection extension
- Configure the consent logging extension
- Save and publish Tealium iQ profile
- Test and troubleshoot
- Customize configuration
Download the required files
Download the following integration template and extensions:
Tealium hosts the CMP files for stability and convenience:
- https://tags.tiqcdn.com/libs/cookieconsent/v3.0.1/cookieconsent.umd.js
- https://tags.tiqcdn.com/libs/cookieconsent/v3.0.1/cookieconsent.css
Configure CookieConsent with Consent Integration in Tealium iQ
Step 1: Create a custom consent integration and enforcement rule
- Go to the iQ Tag Management > Consent Integrations section.
- Click Add Integration.
- Enter a name for the integration that clearly identifies its purpose.
- Select Custom from the vendor drop-down list.
- Enter a placeholder value for Vendor ID such as disabled.
- Define an appropriate enforcement rule. Include exceptions as needed for specific use cases.
- Click Next.
- Select a publish location and click Next.
Step 2: Create purpose group
Create a Purpose Group if one does not already exist:
- Select **+ New Purpose Group **from the purpose group drop-down list.
- Click Create Purpose Group.
- Enter a name and description.
- Click Next.
- Create purposes:
- For each of your
cmpConfig.categories
(from the injection extension code), add a purpose. - For each purpose, use either the category key (such as
necessary
) or a specific service key within the category (such asnecessary-necessary_vendor1
) to map consent decisions in the purpose group.
- For each of 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 3: Set up the template
- In the admin menu, click Manage Templates.
- Select the template for your consent integration from the drop-down list
- Paste the CookieConsent v3 template code into the template editor.
- Apply the changes and save.
Step 4: Set up the injection extension
- Click + Add Extension > Advanced.
- Add a Javascript Code extension.
- Enter a Title to identify the extension.
- Under Scope, select Pre Loader.
- Name the extension and paste the injection extension code into the editor.
- Click Apply.
Step 5: Configure the consent logging extension
- Repeat the steps for adding a new Javascript Code extension.
- Set the scope to Preloader.
- Paste the consent logging extension code into the editor.
- Click Apply.
Step 6: 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
Demo sites
Use the following demo sites to verify implementation:
- Opt-in Mode (GDPR-style): https://solutions.tealium.net/hosted/cjaquith/tiq-from-querystring.html?account=services-caleb&profile=consent-integration-open-source&env=prod&opt_out_mode=false
- Opt-out Mode (California-style): https://solutions.tealium.net/hosted/cjaquith/tiq-from-querystring.html?account=services-caleb&profile=consent-integration-open-source&env=prod&opt_out_mode=true
Verify your consent integration setup
- Visit the demo sites above and accept tracking.
- Open the Developer Tools JavaScript console.
- Use the following commands in your browser’s Developer Tools to test functionality:
CookieConsent.show(true)
to display the banner.CookieConsent.showPreferences(true)
to show the preferences dialog.
- Validate the following:
3. Check for the correct display of banners and dialogs.
4. Verify the consent decision is logged in the
cc_cookie
cookie. 5. Use the Consent Register in Developer Tools to monitor consent activity.
Clear cookies (such as cc_cookie
) between decisions to reset consent status.
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.
Customize configuration
Modify the JSON configuration in the injection extension to match your specific needs (such as categories, services, styles). For more details on all the available CookieConsent configuration options, see CookieConsent: Configuration Reference.
Additional Resources
- Consent Integration: Reference for Consent Integration setup.
- CookieConsent v3.0.1 Playground: Explore configurations and styles.
- CookieConsent: UI Customization: Guide for UI customization.
This page was last updated: December 17, 2024