Blocking third-party cookies and tags via script

One of the main functions of a consent management tool, such as AdOpt, is the ability to also act in an integrated manner with the other tracking tools that the site uses for its digital strategy.

In other words, if a visitor chooses not to authorize the triggering of a facebook advertising pixel for the navigation of your site, how can you integrate this request to the facebook tags in an automated way?

This is precisely why AdOpt has created a way for you to integrate each opt-in collected by AdOpt, with all the tags it manages. This way, AdOpt can allow or not the tag triggering from third parties, avoiding the risk of unauthorized remarketing, for example.

Below is a guideline for this manual configuration (programming knowledge required)

It is important to point out that each developer has his own logic, language and way of designing his Script/Solution. Mainly because each site is unique. Therefore, a step-by-step on our part could not be so "generalist" in order to cover all the different types of sites and logics that we have in the market.

So, then, we leave a brief sequence of factors that must be considered - by you, the developer, when building this application.

When a tag is installed on a site, it means that it has a code, a <script></script>, for example. Such a process can be static, that is, the script is always there, permanently in the code. What the market calls "hard coded". There are also dynamic processes, i.e. the tag script is added to the site dynamically, by another script, hardcoded into the site.

This is exactly what Google Tag Manager does on the sites.

GTM looks at the conditions of the trigger tag, and if it is the case, goes there and adds the <script></script> to the website.

What you, and everyone else who doesn't want to or can't use GTM needs to do, is just that. Build an application that does what GTM does, but by hand.

The AdOpt tag stores the IDs of all tags accepted by the user in the following variable:

window.acceptedTags

manual-tag-blocking_1.png

The tag identifiers can be accessed in the dashboard as shown in the following picture:

manual-tag-blocking_2.png

In addition to accessing this variable, you can also use a callback generated whenever these tags are updated. To do this, simply use the following code:

window.top.firedTags = function (tags) {
   console.log("Accepted tags: ", tags);
 };

This callback is activated as soon as the user enters your site and it comes with the necessary tags already filled in by default. As soon as the user accepts completely or partially this callback is activated again with the updated tags.

Important
since it is not possible to delete a third party cookie, if a user accepts a specific tag and then cancels this acceptance, the callback will come back with this tag. Once the page is reloaded, this tag will be gone from the variable and the callback will not return it.
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

🍪