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

XF 1.4 Inserting google_analytics / Google Tag Manager after <body>

Discussion in 'XenForo Questions and Support' started by okhello, May 28, 2015.

  1. okhello

    okhello Member

    For a variety of reasons I needed to use Google Tag Manager (GTM) to insert my tracking code instead of straight Google Analytics, so I replaced everything in the google_analytics template with my GTM code. We're seeing some goal attribution issues that might be related to having GTM inserted in the <head>, rather than immediately after opening <body> as recommended by GTM.

    What's the best way to get GTM inserted immediately after the opening <body>?

  2. Mike

    Mike XenForo Developer Staff Member

    You'd want to edit the PAGE_CONTAINER template directly.

Share This Page