Expandir minha barra de realizações na Comunidade.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLUCIONADO

How to insert custom code in html head tag

Avatar

Level 1

In Launch, I setup Rules to have a custom HTML code which needs to be in HTML <head> element.

When I publish it, I can see the custom HTML code is added at the bottom of the HTML output right before closing </body> tag. How can I configure this to be inside <head> ... </head> section?

 

Thanks!

Tópicos

Os tópicos ajudam a categorizar o conteúdo da comunidade e aumentam sua capacidade de descobrir conteúdo relevante.

1 Solução aceita

Avatar

Resposta correta de
Community Advisor

In general, you can't – or rather, shouldn't – add code to <head> through a tag management system. Such code should be added directly to the page's HTML, i.e. with dev support.

What are you trying to insert into the <head>?

Ver solução na publicação original

4 Respostas

Avatar

Resposta correta de
Community Advisor

In general, you can't – or rather, shouldn't – add code to <head> through a tag management system. Such code should be added directly to the page's HTML, i.e. with dev support.

What are you trying to insert into the <head>?

Avatar

Level 1
I was trying to add a third party tracking code which needs to be in the head section using Launch. Isn't it possible?

Avatar

Level 2

@sungl Actually it's hard to get the third party code tagged to head via launch. However the tags which work even if placed in the body section, should be implemented via launch.

Other tags which has mandatory behaviour to be tagged in the head, should go either via AEM third party analytics or have dev team directly do it on the site.

Hope it helps.

 

Avatar

Community Advisor

Try add the tracking code via this method: https://stackoverflow.com/a/18784960