내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

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>

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
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.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
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.