MyBB Community Forums

Full Version: Where to insert Analytics script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know it says right before the closing head tag, but I cannot find it. The index file in my public html is a index.php and it will not allow me to use the html editor. The only options are "edit" and "Code Editor" and they do not have head tags anywhere in the codes - that I can see. I even used the search function for </head> & [/head] and no results were found.

Huh
Recommend getting this small Plugin.

http://mods.mybb.com/view/google-analytics-plugin

Does it all for you. Easy, Light on your Forum and Simple
In the footer template...
Hydra that plugin does not have good reviews I will not use it but thanks.

Leon thanks I think Matt told me that in another thread and I forgot. I went to ACP>Templates & Style>Luxure Templates>Footer Templates>Footer and clicked edit and there are no head tags anywhere. Does it go anywhere in here?

[attachment=25841]
Put it in your headerinclude template, which is in the "Ungrouped Templates" group.
(2012-03-25, 06:31 PM)Paul H. Wrote: [ -> ]Put it in your headerinclude template, which is in the "Ungrouped Templates" group.

It doesn't have any head tags either so where would I pout it? And everything I have read says to put it before the last head tag closing - does mybb not use headtags? And if they do not, what is the equivalent so I figure out where to put this script?

[attachment=25843]
The headerinclude template is what is put between the <head> tags. Put it at the bottom of the template and it will work.
Yeah the head tag is where Google says to put it but I always put it in the footer. If it's at the end of the headerinclude or end of the footer template it'll work. The </head> tag is actually in multiple templates but the headerinclude is included right before it. I think Google say to put it before the head so it runs sooner but it will still work if it's put somewhere else.
Kevin, I put my google analytics code in my footer template and works without any problem.
Example:
<Your footer code>
and after that your Google analytics code
<here>

The head tag is not visible, and what you put into it, there will be no problems.

After that, you can make sure in http://www.woorank.com/en/www/yourdomain