AdOpt Cookie Consent Banner | Community
Skip to main content
June 30, 2023
Solved

AdOpt Cookie Consent Banner

  • June 30, 2023
  • 1 reply
  • 1633 views

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>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

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.

1 reply

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
July 1, 2023

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.

July 4, 2023

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

yuhuisg
Community Advisor
Community Advisor
July 5, 2023

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.