How to perform Tag Blocking via Google Tag Manager (GTM)?
Both steps below must be carried out for each Tag added or removed within your Disclaimer in AdOpt.
Select your Tag ID inside the AdOpt platform.
Understand whether your use of Tag Manager is Simple or Advanced.
1. Select your TAG ID inside the AdOpt platform
Log in to your AdOpt account.
Go to your (1) Organization.
Make sure to select the (2) Disclaimer in which you want to block the Tags.
Go to the (3) Tag scanner step of your Disclaimer.
5. Copy the (4) Tag ID you will use to configure the Tag Blocking in Google Tag Manager (GTM).
2. Understand whether your use of Tag Manager is Simple or Advanced
There are two paths depending on how you use your GTM to configure your Analytics and other Tag events:
Simple Setup
If the Tag trigger is a simple pageview, meaning the Tag fires just by loading the page. In this case, we’ll do a Simple Setup by replacing the trigger with a “Custom Event”.
1. To begin, in your GTM pannel, select the Tag by opening the Tag Configuration page.
2. In the Triggering section, remove the current trigger, “Page View”.
ℹ️ Info: After configuring the Custom Event, it's okay to remove this trigger, but in the end, the "Custom Event" trigger must be the only trigger for this Tag.
3. To configure the new trigger, click anywhere in the trigger area to open the menu of your existing triggers or those used in other Tags.
4. In the upper right corner, click the “+” sign.
5. Click anywhere in the “Trigger Configuration” area to open the trigger type menu.
Select “Custom Event”.
6. In the “Event Name” field, enter the Tag ID you copied at the beginning of this tutorial.
7. Ensure the option “All Custom Events” is checked. If it isn’t, check it.
8. If you haven’t named this trigger yet, do so on the top left of this configuration page and click “Save” in the top right corner.
💡 Tip: Choose a name that lets you know this trigger is specific to the Tag you’re configuring. Example: TriggerTAGX ... TriggerTAGY ... etc. (remember, each new tag will need a new setup, and therefore a new trigger).
9. After this, you’ll be back in the tag configuration, now with the new trigger set up.
If you haven’t removed the default pageview trigger, and now the new trigger is the only one, click “Save” in the top right corner and... done! You’ve just reconfigured one of your Tags.
Repeat steps 1 through 9 for every Tag that needs to be reconfigured and that fires on all pageviews.
⚠️ Important: Once all Tag configurations are complete, don’t forget to “Submit” and “Publish” your changes in GTM.
Another option for blocking would be to use the events triggered when a category is accepted. This option is easier if you have many Tags, but offers less granularity, since the event only fires when the whole category is accepted.
Here is how the Tag Categorization functions:
Necessary -> adopt-accept-required
Marketing -> adopt-accept-marketing
Statistics -> adopt-accept-statistics
Performance -> adopt-accept-performance
Functional -> adopt-accept-functional
Advanced Setup
If you have one or more Tags with more elaborate triggers, such as URL keywords (regex), click events, page scrolling, etc... or even a combination of these, you’ll need to configure the existing trigger for each Advanced Tag with an additional condition, as explained below:
1. In your GTM pannel, select the Tag and click on the existing trigger to open the trigger configuration.
2. Click the trigger again to display the options menu.
3. If the option “All Custom Events” is selected, it means you don’t have any other rules. Change it to “Some Custom Events” to display new fields for setting rules.
4. If you already have some rules, click the “+” sign to add a new rule.
5. In the first field, select “New variable…”, then in the menu that appears, click “Variable Configuration”, and for variable type, choose “JavaScript Variable”.
⚠️ Important: Don’t confuse it with “Custom JavaScript”. The correct option is “JavaScript Variable”
6. In the “Global Variable Name” field, enter the value window.acceptedTags, exactly as written.
⚠️ Important: Make sure you typed these words exactly as shown in this tutorial, no spaces and using the correct case.
7. You can now name the variable something generic, such as “Tags_Accepted_AdOpt”, since it can be reused for configuring other triggers in this same advanced setup.
8. Click “Save” in the top right corner.
From here on, all the following steps should be repeated using the same variable for all Tags used.
Back in the trigger configuration, ensure the first field has the variable you just created.
In the second field, select the option contains.
In the last field, enter the AdOpt tag ID you copied at the beginning of this tutorial.
4. Click “Save” on the top right.
Repeat the last steps 1 to 4 (except for variable creation) for all Tags that have more advanced triggers, just selecting the variable name you created in the first field of the trigger’s extra rules.
⚠️ Important: Once all Tag configurations are complete, don’t forget to “Submit” and “Publish” your changes in GTM.












