Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

AdOpt Cookie Consent Banner

Avatar

Level 1

How can I correctly add this code snippet using rules?

I tried adding it through 'core / page top / custom code,' but it only displays the script and doesn't show the cookie consent banner that is supposed to be generated by this script.

here is the code snippet
<meta name="adopt-website-id" content="numeric-sequence" />
<script src="//tag.goadopt.io/injector.js?website_code=numeric-sequence"
class="adopt-injector"></script>

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

The general consensus for implementing consent banner code is to do so directly in the page's code, i.e. don't use any tag manager including Tags. If you go down this route, then you'll have to work with your developers to get the consent banner code implemented properly.

The reason for this is that if you load the consent banner code within a tag manager, you're not only introducing an ambiguous state (the user hasn't granted or denied consent, yet you're loading tracking), but there could also be a "race condition" between when the user grants consent vs when your tracking code runs.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

The general consensus for implementing consent banner code is to do so directly in the page's code, i.e. don't use any tag manager including Tags. If you go down this route, then you'll have to work with your developers to get the consent banner code implemented properly.

The reason for this is that if you load the consent banner code within a tag manager, you're not only introducing an ambiguous state (the user hasn't granted or denied consent, yet you're loading tracking), but there could also be a "race condition" between when the user grants consent vs when your tracking code runs.

Avatar

Level 1

Thank you @yuhuisg I tried place the code directly into AEM page, but seems that something block this code from being executed

Avatar

Community Advisor

If the code can't even run when placed directly in the page, then there's some other conflict somewhere. You'll have to solve this with your developers.