Blocking via GTM (Google Tag Manager)

To configure Manual Tag Blocking directly in the site's HTML via Browser Array, follow the tutorial here.

How to perform Tag Blocking via Google Tag Mangaer (GTM)?

Both steps below must be carried out for each Tag added or removed under AdOpt's management.

  1. Select your Tag ID inside the AdOpt platform.
  2. Understand whether your use of Tag Manager is Simple or Advanced.

1. Select your TAG ID inside the AdOpt platform

  1. Log in to your AdOpt account.

  2. Go to your (1) Organization.

  3. Make sure to select the (2) Disclaimer in which you want to block the Tags.

  4. Go to the (3) Tag scanner step of your Disclaimer.

gtm_tag_blocking-01-att.png 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 theTag 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.

gtm-tag-blocking_3.png

2 - In the Triggering section, remove the current trigger, “Page View”.

Info
It's okay to remove this trigger after configuring the Custom Event, but in the end, the "Custom Event" trigger must be the only trigger for this Tag.

gtm-tag-blocking_4.png

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.

gtm-tag-blocking_5.png

5 - Click anywhere in the “Trigger Configuration” area to open the trigger type menu. Select “Custom Event”.

gtm-tag-blocking_6.png

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.

gtm-tag-blocking_7.png

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: Trigger_TAG_X ... Trigger_TAG_Y ... 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.

gtm-tag-blocking_8.png

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.

gtm-tag-blocking_9.png

4 - If you already have some rules, click the “+” sign to add a new rule.

gtm-tag-blocking_10.png

5 - In the first field, select “New variable…”, then in the menu that appears, click “Variable Configuration”, and for variable type, choose “JavaScript Variable”.

gtm-tag-blocking_11.png

6 - In the “Global Variable Name” field, enter the value

window.acceptedTags
, exactly as written.

gtm-tag-blocking_12.png

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.

  1. Back in the trigger configuration, ensure the first field has the variable you just created.

  2. In the second field, select the option contains.

  3. In the last field, enter the AdOpt tag ID you copied at the beginning of this tutorial.

gtm-tag-blocking_14.png 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.**
Logo
Address: 7345 W Sand Lake Road, Ste 210 Office 5898 Orlando, FL 32819
EIN: 86-3965064
Phone: +1 (407) 768-3792

AdOpt

Resources

Legal Terms

© GO ADOPT, LLC since 2020 • Made by people who love

🍪