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>
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
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.
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.
Thank you @yuhuisg I tried place the code directly into AEM page, but seems that something block this code from being executed
Views
Replies
Total Likes
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.
Views
Like
Replies
Views
Likes
Replies