1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

GTM directly after <body> via template-hooks

Discussion in 'XenForo Development Discussions' started by adchased, Jun 9, 2015.

  1. adchased

    adchased Member

    Hello everyone,

    I just created an add-on for template-hooks making use of the body-hook.

    Unfortunately I need the additional content to be DIRECTLY after the <body> but at the moment it is enqueued just before the </body>.

    btw: the code I try to implement is the Google Tag Manager - according to Google the code has to be placed exactly after the opening body-tag.

    Is there a way I can do this using hooks?

    Thanks for your help in advance!
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Can't you use a template modification to inject it exactly where you want?
  3. adchased

    adchased Member

    Thanks your reply!

    If it's in any way possible to avoid modifying a template, we would appreciate it due to updates :)
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. adchased

    adchased Member

    Thanks a lot Brogan!

    Seems to be perfect for the matter :)

Share This Page