How to Add MyBB Google Analytics Without MyBB Plugins

How to Add MyBB Google Analytics Without MyBB Plugins, 5.0 out of 5 based on 5 ratings

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.

VN:F [1.9.20_1166]
Rate This post
Rating: 5.0/5 (5 votes cast)

8 thoughts on “How to Add MyBB Google Analytics Without MyBB Plugins

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by Sweet Captcha
Verify your real existence,
Drag the missing digit to the phone
  • captcha
  • captcha
  • captcha
  • captcha