• Ask, answer, and discuss all things having to do with the product brands that you own, use, and love. Please feel free to look around, and browse about the forum!

  • Tips and Tricks Forum is the best source of computer and technology troubleshooting advice from a community of experts.

Thread Rating:
  • 0 Vote(s) - 0 Average
How to add Google Analytics in Mybb without plugin
How to add Google Analytics in Mybb without plugin
10-02-2013 - 07:45 PM


  • Posts: 83
  • Joined: Jan 2013
  • Reputation: 1
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 and it maybe not work when you update Mybb new version. You can put a MyBB Google Analytics tracking code on your forum without any plugins easily, here’s how.

Step 1. Register a Google Analytics account and you will have your tracking code. It should be something like this:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37561356-1']);
  _gaq.push(['_setDomainName', 'tipsandtricksforum.com']);
  _gaq.push(['_setAllowLinker', true]);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


Step 2. Go to Admin CP > Templates & Style > Templates > (your running templates) > Ungrouped Templates > headerinclude.


Step 3: Copy and paste your Google Analytics code from Step 1 just above
and Save changes.

It will start tracking your forum soon afterward, easy with no MyBB plugins needed.
(This post was last modified: 10-02-2013 07:50 PM by fjam.)

Forum Jump:

User(s) browsing this thread: 1 Guest(s)