GTM

Alex Koshel asked on April 15, 2025 20:39

It is necessary that the GTM script is always before < /head >. On all pages. Any ideas on how to place it always at the end of the head ?

Recent Answers


Brenden Kehren answered on April 15, 2025 22:28

In Kentico 11, it's quite a bit harder to have it be the very last item in the <head> tag without some interesting workarounds. Typically, this is the simplest place to add it on the Master Page template.

Image Text

0 votesVote for this answer Mark as a Correct answer

Alex Koshel answered on April 16, 2025 19:57

This method doesn't work, I can't even see the script on the page. Are there any other workarounds?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on April 16, 2025 19:58

Then there's a good chance you're site is using custom aspx templates. If that's the case, you'll need access to your code base to add the requested code you're talking about.

0 votesVote for this answer Mark as a Correct answer

Alex Koshel answered on April 16, 2025 20:01

I tried to change PortalTemplate.aspx but there was no positive result. Kentika added tags after my script.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.