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

Google Analytics

Discussion in 'XenForo Questions and Support' started by oman, May 21, 2013.

  1. oman

    oman Well-Known Member

    Hi,

    What is the best way to implement Google analytics on a XenForo website without having to put the code in every template?

    Thanks
     
  2. Walter

    Walter Well-Known Member

    No need to add it into every template - go into the admin panel and click on "Options", Statistics and Metrics.

    Or use the free alternative Piwik.
     
  3. oman

    oman Well-Known Member

    Very nice! Yeah, I'm just using the basic version of Google Analytics. :)
     
  4. gmaister22

    gmaister22 Active Member

    I have added my code in that form

    UA-XXXXX-Y

    But i get:
    Status: Tracking Not Installed


    I inspected the html of my site and its there:
    [​IMG]

    Any ideas?
     
  5. Brandon Sheley

    Brandon Sheley Well-Known Member

    Wit a few mins and try again if you can see it as a guest.
     
  6. gmaister22

    gmaister22 Active Member

    The code is visible to guests... :(
     
  7. gmaister22

    gmaister22 Active Member

    Any ideas? :(
     
  8. usAdultAds

    usAdultAds Active Member

    which looks much better :) but how to plug it into xf? on the options/stats page there is a slot
    for google analytics of course, but nothing else, so how do i tie this into xf?

    Thanks

     
  9. Walter

    Walter Well-Known Member

    Simply put the Piwik code into the apropriate ad templates, e.g. ad_message_below.
     
  10. usAdultAds

    usAdultAds Active Member

    Do i put the piwik code in all ad_*.* templates? I put it in ad_message_below, and no live stats are showing....

     
  11. Edrondol

    Edrondol Well-Known Member

    I have mine in page_container and it works fine. But be aware that if you upgrade XF you remember to redo it, otherwise Piwik will be trying to connect with everything you do and will slow you down.
     
  12. usAdultAds

    usAdultAds Active Member

    and it will monitor every single page from there?

     
  13. Edrondol

    Edrondol Well-Known Member

    Yes. Put the code just after </xen:hook>.
     
  14. Edrondol

    Edrondol Well-Known Member

    Oh, and use the TMS if you have it. It'll help a lot when you upgrade.
     

Share This Page