MyBB Google Analytics tracking code on your MyBB forum without plugins.
Google Analytics tracks the amount of visitors to your website, which requires a MyBB Google Analytics tracking code to be placed on your forum. I’ve seen MyBB Google Analytics plugins to do this, but the truth is it’s not required. You can put a MyBB Google Analytics tracking code on your forum without any plugins easily, here’s how.
1. On your Google Analytics account, find your tracking code. It should be something like this:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-Y']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>2. Go to Admin CP > Templates & Style > Templates > (your default templates) > Ungrouped Templates > headerinclude.
3. Find:
{$newpmmsg}Copy and paste your MyBB Google Analytics tracking code just above that line, save changes. Also save to verify your tracking code on your Google Analytics Tracking ID page.
It’ll start tracking your forum soon afterward, easy with no MyBB plugins needed.
Thanks!
loving your website!
Thanks for the tutorial, that works.
Thanks for the tutorial.
I think, doing it manually is better than using a plugin for this one. Plugins will somehow slowdown the forum.
Thanks for nice and easy guide
Awesome, Thank you very much….
Thanks! I was getting stuck with the plugins!
Thanks! Nice tutorial and nice blog!