MyBB Community Forums

Full Version: How to integrate Google analytics with Drupal + mybb site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My main site is in Drupal/Joomla and forum is in MyBB.


Mainsite:www.example.com
Forum:http://forum.example.com


There is a mod with Drupal which gives an option to choose if my site is having subdomains which I've selected.

I've installed the google analytics plugin in my MyBB forum. But it does not ask for subdomain option. That means it is inserting default GA tracking code which is different from without subdomain option.

What should I do? Is there any other plugin?
How can I manually add tracking code?

Look at this guide: http://www.google.com/support/analytics/...swer=55524

For Drupal, you can use this module: http://drupal.org/project/google_analytics . Which allows you to select the option to use a main domain and multiple subdomains. And you can also add custom variables to Analytics.

In MyBB just copy the code from the Drupal website into your headerinclude template.
Aries-Belgium, thanks. I've two questions:
1) Should I copy the analytics code from Drupal site by using "view source"?
2) Any specific reason why into headerinclude template( and not for example footer template)?
1) That's correct.
2) I believe the new version of Analytics requires it to be in the head. But look where it is located in Drupal and put it in the same place in the MyBB templates.