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

alternative tracking/analytics code location

Discussion in 'XenForo Questions and Support' started by Live Free, Jul 11, 2011.

  1. Live Free

    Live Free Active Member

    I'm using Google Analytics but I'd like to use another service as well. I need to include code before the </head> tag and the </body> one.

    I know I can do this by editing the style, but is there a simpler way? What do I need to edit?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    You will need to edit the PAGE_CONTAINER template.
    Brandon Sheley likes this.
  3. Live Free

    Live Free Active Member

    Thank you! :D
  4. ragtek

    ragtek Guest

    You could also use the template hooks for this (so you wouldn't need to change the templates in every style you have, and you wouldn't need to edit them again, after a upgrade where it was necessary to revert the templates..)

    You can use template hook: page_container_head to add something before the </head> tag

    And template hook body or page_container_js_body can be used to add something before the </body>

Share This Page