Custom CMP integrations
This article describes how to configure a custom consent management platform in Tealium iQ Consent Integrations.
How it works
Tealium Consent Integrations consist of two parts:
- A consent enforcement framework for Tealium iQ (the
utcm_framework
template). - CMP-specific integration templates that leverage the Tealium iQ consent enforcement framework. These integration templates are designed to be as lightweight as possible.
Our pre-built integrations supports integration with various consent management platforms (CMPs). However, there are instances where a custom integration is recommended, such as:
- Using a CMP without a pre-built integration.
- Using an internal tool to capture consent.
- Using a supported CMP with extensive customizations that break the standard integration.
In such cases, you can use a custom integration. By using JavaScript functions, any consent capture tool can leverage the enforcement framework.
To add a new custom integration, use the existing integrations and the provided template as a guide.
The following describes a basic workflow for creating a custom integration:
- Develop and debug the integration outside Tealium iQ (website where CMP is implemented).
- In Tealium iQ, add a new custom consent integration and purpose group. For more information, see Manage Consent Integrations and purpose groups.
- Assign Tealium iQ and the appropriate tags to the purposes within the purpose group.
- To create the template, save your profile.
- Edit the newly created template. For details, see Manage templates.
- Publish the template to a development or test environment to verify that everything works as expected, and then follow your normal testing and publishing flow.
Develop, debug, and validate custom integrations
To create your custom CMP integration, edit the custom template below to meet your CMP requirements. See the comments in the custom template for a working example.
Develop and debug before publish
Complete the following steps to debug during development:
- Uncomment the Debugging block at the end of the custom template.
- Paste the template into the console of a website running the CMP you want to support.
- The debugging code block outputs the consent decision.
- Customize your decision and paste the template again to see the newly interpreted consent decision.
- When you are satisfied with your template, comment out the debugging block again before pasting and publishing it to Tealium iQ.
You can also find the debugging snippet by saving your profile and editing the template.
Validate after publish
There are two ways to debug and validate your template after publishing: using debug mode or using the window.tealiumCmpOutput
object.
Using debug mode
To use debug mode:
- Set the
utagdb
cookie totrue
withdocument.cookie = "utagdb=true"
in the console. - Set your console filter to see only the relevant output (the suggested filter is in the debug output).
- Test different options to make sure things work as expected.
Using the window.tealiumCmpOutput
object
To use the window.tealiumCmpOutput
object:
- Paste the commented out debugging code block at the bottom of the template into the console to output only your decision and related output.
- If needed, you can also call the functions in the template individually or access the other useful properties of this object.
For more detailed debugging tips for prebuilt and custom integrations, see Validate and debug consent integrations.
Integration functions
The CMP-specific component of the integration is defined using the window.tealiumCmpIntegration
object.
The window.tealiumCmpIntegration
object consists of a name .cmpName
, version .cmpIntegrationVersion
, and the following functions:
Determine operating mode
.cmpCheckIfOptInModel
- determines whether the integration should operate on theopt-in
oropt-out
model. Returns a boolean value.
Fetch decision
.cmpFetchCurrentConsentDecision
- retrieves the current raw version of the consent decision (raw version, from the CMP). The result must be an object and is passed as an argument to all subsequent functions.
Validate and standardize the decision
-
.cmpCheckForWellFormedDecision
- checks if the raw version of the consent decision is well-formed and understandable. Returns a boolean value. -
.cmpCheckForTiqConsent
- determines whether the raw consent decision contains permission for data processing by Tealium iQ. If false, nothing is executed. Returns a boolean value. -
.cmpCheckForExplicitConsentDecision
- determines whether the raw consent decision isexplicit
orimplicit
. Returns a boolean value. -
.cmpConvertResponseToGroupList
- converts the raw decision into a simple array of allowed purpose keys for downstream enforcement. Returns an array of consented purpose keys.
Monitor and trigger consent updates
-
.cmpAddCallbackToTriggerRecheck
- registers a callback function to be invoked whenever the CMP’s consent status changes. This ensures Tealium iQ is promptly updated with the latest consent decisions without relying on polling.Ensure that
cmpAddCallbackToTriggerRecheck
is configured to calltriggerRecheck()
whenever the CMP signals a consent status change through callbacks or alternative implementation methods. CalltriggerRecheck()
when the banner pops up for implicit consent or at a similar point in the CMP load. See the comments in the custom integration template for more details. For integrations that currently support callbacks, see Supported vendor integrations.
Custom Integration template
The following is a blank template to help you get started with your own custom integration. The template includes a debugging snippet at the end of the template that you can use to debug and validate your consent integration.
This page was last updated: March 12, 2025