17

Google tag manager: add custom code immediately after the opening tag

new
April 14, 2025

GTM needs 2 parts of code:
1: Paste this code as high in the of the page as possible:
2: Paste this code immediately after the opening tag:

There are 2 hooks now, but the second one is \’before closed body\’.
That one will not do for Google tag manager second part of code that needs to be placed \’immediately after the opening tag\’.

One response to “Google tag manager: add custom code immediately after the opening tag”

  1. Sergey Efimov Avatar
    Sergey Efimov

    The same problem, the iframe is cut off, and as a result, data collection does not work. Everything was fine on some patches, but now it does not work again.

    Before save:


    After save:

Leave a Reply

Latest Voters