Privacy regulations are constantly evolving, and we want to help you stay ahead of them. That’s why we’ve made it easier than ever to ensure your site respects your readers' privacy choices and stays compliant. While we don’t provide legal advice, we recommend reviewing the information below with your business and/or legal partners.
Consent mode lets you communicate your readers’ cookie or app identifier consent status to Google. This feature ensures your tags will load based on readers' data choices, which may help your site stay compliant and allow you to:
- Respect what readers give consent to
- Adjust how tags behave
- Keep measuring site activity in a compliant way
This guide provides a step-by-step process for configuring your Raptive Ads and Google Tag Manager (GTM) to control tag firing based on consent signals sent by Raptive. The setup involves two main goals:
- Enabling Google consent mode in your Raptive account
- Adding triggers for the necessary tags to load in your GTM account
These instructions do not apply to Google products like Google Analytics. They load and listen to consent signals to adjust behavior accordingly.
| Note: If you’re only using Google products within your Google tag ecosystem, you can skip Step #2 and #3 of this guide. |
Please note that our current integration provides worldwide coverage and cannot yet be segmented by region. If you have specific concerns about Google Analytics (GA) cookies being set in the EU, please contact your Raptive support team for details on integrating our delayed Google Analytics script.
| Important Legal Disclaimer: Raptive does not provide legal advice. Raptive can provide support on the implementation of industry standards and partner technical requirements only, and is not responsible for your legal compliance. If you have concerns regarding legal or regulatory issues, you should consult with your own lawyer. |
How to block GTM tags based on user consent
Prerequisites
Before you begin, please ensure the following:
- Raptive’s consent mode feature is enabled: Contact your Raptive Creator Partnership Manager to enable your site for consent mode blocking.
- Vendor list: Review the Raptive default vendor list to find your vendors and their corresponding IDs (necessary for any non-Google tags load)
Step 1: Install the ConsentManager template
Install the template
- From GTM, go to Templates > Search Gallery and install the ConsentManager tag template. Raptive partners with ConsentManager for the consent mode feature; they are an authorized partner
- Click New to add a new tag to apply the template to
- Next, click the Tag Configuration section to add the template.
- Click the Search icon
- Search for Consentmanager
- Click Choose Template to add the template to your GTM account
Configure the template
-
Triggering: Set the trigger to Consent Initialization
-
Disable CMP: Check the box to disable the CMP popup. Raptive's ad code will load the CMP separately from GTM. We are only using this template for consent mode features.
- CMP details: The tag setup may require that you insert a Consentmanager.net ID, Consentmanager.net host, and Consentmanager.net CDN. Please request these details from your Raptive support team.
-
Enable Google consent mode: Ensure this box is checked in the template configuration.
- Timeout: Set the timeout to 1500.
-
Consent mode defaults: Ensure all checkboxes under "Consent mode defaults" are unchecked. This indicates that no consent is assumed.
Naming and execution order
- Name the tag (e.g., Raptive Consent Tag Manager)
- Save and make sure your trigger group is set to Consent Initialization, so that this tag fires first
- This step is critical so that user consent preferences are available to other GTM tags before they execute
Step 2: Add Vendor IDs associated with your tags
| Note: If your GTM setup only includes Google products (such as Google Analytics, Google Ads, etc.) you can skip this step. These tags will load listen for Consent Signals and process accordingly. |
In the following steps, you will create a variable to save the list of vendor IDs that the user must consent to for the tag to load on your pages.
Create the cmpConsentVendors variable
- Go to Variables > New
- Click this button in the Variable Configuration section to start creating a new variable
- Set Variable Type to Data Layer Variable
- Set the name to cmpConsentVendors
- This variable contains the list of vendors you want to check for consent on your tags. This should be mapped from the prerequisite step above
- This variable contains the list of vendors you want to check for consent on your tags. This should be mapped from the prerequisite step above
- This variable will contain a comma-delimited string of consented vendor IDs (e.g., ,s26,s91,s105,).
- Note: The leading and trailing commas are required.
In the next section, you will create a Trigger that will call your tags when user consent has been collected.
Create triggers for vendor consent
- You will create a reusable trigger that fires only when consent has been given for a specific vendor, or list of vendors.
- Go to Triggers > New and create a Custom Event Trigger
-
Set the Event Name to: cmpEvent
- The event name is critical for this configuration to operate properly. If an incorrect name is entered, the vendor ID data will not be read, and the tag will not fire.
- The event name is critical for this configuration to operate properly. If an incorrect name is entered, the vendor ID data will not be read, and the tag will not fire.
-
Add a Condition:
- Variable: cmpConsentVendors
- Operator: contains
- Value: Include your partner’s vendor ID with leading/trailing commas, e.g., ,s38,
- Repeat this for each vendor you want to control tags for
Step 3: Connect triggers to tags
|
Note: If your GTM setup only includes Google products (such as Google Analytics, Google Ads, etc.) you can skip this step. These tags will load listen for Consent Signals and process accordingly. |
With the variable and trigger created, you can now enforce consent on your existing tags. Your tags will fall into one of two categories:
Tags without existing triggers
- Edit the tag
- Add the vendor-specific trigger you created in Step 2
- Save
Tags with existing triggers
- Go to Triggers > New > Trigger Group
- Add:
- The existing trigger
- The vendor-specific consent trigger (e.g., cmpEvent with ,s26,)
- Save the Trigger Group
- Update the tag to use this Trigger Group instead of a single trigger
- Confirm the two triggers use “AND” to both be true to fire
- Save
This ensures the tag only fires if both the original condition and user consent are met.
Step 4: Testing your Consent Mode configuration
Always test your changes using GTM's preview mode to ensure everything works as expected.
-
Testing default opt-out behavior in EU
- Use a VPN to simulate an EU location (e.g., Germany)
- Open your site in GTM preview mode
-
- On the CMP popup, click Reject All
- On the CMP popup, click Reject All
-
- Use Google Tag Assistant to verify:
- Tag Assistant can be assessed via the link above, or through your GTM account by clicking the Preview button in the top right corner of the UI
- Tag Assistant can be assessed via the link above, or through your GTM account by clicking the Preview button in the top right corner of the UI
- Use Google Tag Assistant to verify:
-
-
- To check that Tags associated with vendors did not fire, you can view the GTM event history as seen in the screenshot below and check for the Trigger Group, if it is missing from the list, then it did not fire the associating tags
- To check that Tags associated with vendors did not fire, you can view the GTM event history as seen in the screenshot below and check for the Trigger Group, if it is missing from the list, then it did not fire the associating tags
-
-
Testing default opt-in behavior in US
- Disable VPN or set it to the United States
- Open your site in GTM preview mode
- You must enter your homepage URL to see the Do Not Sell link from Raptive
- You must enter your homepage URL to see the Do Not Sell link from Raptive
-
- Verify:
- Scroll down to the bottom of the homepage to find the link below, this confirms that Raptive has not detected an opt-out signal. (footer should read: “Do not sell or share my personal information”.)
- Scroll down to the bottom of the homepage to find the link below, this confirms that Raptive has not detected an opt-out signal. (footer should read: “Do not sell or share my personal information”.)
- Verify:
-
-
- If you completed Step 2, you should see a Trigger Group event. Clicking into it, you should see the Tags Fired section with your tags associated with vendors included. When you opt-out via the footer text, these will not fire.
- If you completed Step 2, you should see a Trigger Group event. Clicking into it, you should see the Tags Fired section with your tags associated with vendors included. When you opt-out via the footer text, these will not fire.
-