MyBB Community Forums

Full Version: Google Analytics Code Placement?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been pulling my hair out for a couple of hours now, wondering where exacty (be in in a file, multiple files, or a database column) where I can add my google analytics code, so that it loads on every single forum page view.

Help?
This plugin should provide an easy way to do this:
http://mods.mybboard.net/view/google-analytics

Smile
Thanks so much for your help - that was perfect! Although, it would be nice to know if there is even just one file or database column that is loaded on every single page. Obviously, there is a header and such, and I do wonder where all of that is loaded from, and how.

If anybody has these answers, I'd be appreciative.

rh1n0 Wrote:This plugin should provide an easy way to do this:
http://mods.mybboard.net/view/google-analytics

Smile
You can look at the plugin code to see how it works. It's added to the $page variable. Once you get the hang of plugins you realize how easy most of them are to make.
I believe that plugin just places the code in the footer template which is loaded in every page of MyBB as it contains the copyright.
To find the template:
Admin CP --> Templates --> Modify / Delete --> *Choose your template set and click 'Expand'* --> footer

Edit: I stand corrected. Toungue
(2008-02-03, 02:08 AM)rh1n0 Wrote: [ -> ]I believe that plugin just places the code in the footer template which is loaded in every page of MyBB as it contains the copyright.
To find the template:
Admin CP --> Templates --> Modify / Delete --> *Choose your template set and click 'Expand'* --> footer

Edit: I stand corrected. Toungue

I know this is an old thread, but I wanted to say thanks - this is exactly what I needed.