Adobe Tags Embed Script - <head> vs <body> | Community
Skip to main content
Level 3
October 9, 2025
Question

Adobe Tags Embed Script - <head> vs <body>

  • October 9, 2025
  • 1 reply
  • 475 views

Hello everyone,

 

We have followed Adobe's recommendation of implementing the adobe tags embed script in the <head> tag under our UserConsent script (OneTrust). We are currently facing an issue where the Adobe script is firing too quickly before the OneTrust (OptanonConsent) cookie is written. Resulting in the rule not firing for individuals landing on the page without previously having the OptanonConsent cookie.

 

The question here is, if we were to move the Adobe embed script to the <body>, I assume that this would solve for the 'cookie not present' issue.

 

Let me know your thoughts as I would like to understand if the placement recommendation in the <head> tag was strict or guidance and if so, why?

 

Thanks,
Tyrese

1 reply

Devyendar
Level 6
October 10, 2025

Do not move the Adobe tag to body it is NOT recommended, Adobe Tags should file in Head tag itself, moving to body can create data challenges for Adobe Analytics and flicker issues for Target.

 

The real fix is to control when Tags are fire.

  • For Adobe Analytics pageview/Target rule in Adobe Tags (Launch) add Rule condition to fire only when the OneTrust consent cookie or event exists.

This will hold Adobe rules from triggering without OneTrust consent.

tyreseAuthor
Level 3
October 10, 2025

Hey @devyendar ,

 

Thanks for the clarification on that.

 

Can you help me to understand which explicit condition type allows this 'promise' functionality. eg, are you suggesting to:

  1. Create Data Element
  2. Use Value comparsion
  3. operator = 'true' ?

Or are you suggesting that we leverage custom code?

 

Because what is currently happening is that we are checking for a cookie to equal a certain value at the time in which the rule runs, however the cookie is not present at the time in which the rule runs... So trying to understand which Core Condition Type allows for this 'promise to fire' functionality.

 

Thanks,

Ty

tyreseAuthor
Level 3
October 10, 2025

Also confirming that we are leveraging CJA and not Adobe Analytics, does that change your stance in any way?

 

Thanks,
Ty