The bane of many a WPMU site owners life has been the question of how to give your users access to Google Analytics, while being able to use it yourself for sitewide statistics.
Well, we’re about to let you have your cake and eat it too :)
Presenting – Google Analytics for WordPress MU – a plugin that does exactly what you’ve always weanted it to do :)
Essentially it allows you to simply enter your ‘UA’ code into a new field in Site Admin > Options AS WELL AS allowing your users to enter their code in Settings > Google Analytics.
And, they will both work together! Oh frabjous day etc. :)
And if that’s not enough to make you go ‘Callooh! Callay!’ – well, we’ve also integrated this into our ‘Supporter’ framework – so you can restrict access to the individual stats to to paying users only (if you wish). Just visit Site Admin > Supporter once it’s installed to set it to free / paid.
Enjoy the statistical goodness!

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more
Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more
Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more
Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more
No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more
It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more
If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more
Out of all the WordPress ecommerce plugins available, this has got to be the winner - easy to configure, powerful functionality, multiple gateways and more. A simply brilliant plugin!
Find out more
If you've ever wondered how you could offer a paid site management and hosting service, then this is the plugin for you. Offer a freemium or paid service, for any niche you like, it's powered Edublogs.org to success already!
Find out more
FANTASTIC! I’ve been thinking of building something like this myself – but the works been done for me! Thanks.
Issa pleasure :)
Actualy – i take that back.. paid plugin for a free service :/
I think i’ll build my own.
No worries, if you don’t want to sign up for a massive timesaver (btw, the fee covers all 50 plugins and themes on the site) then that’s your call, no-ones forcing ya to.
Nice plugin James, we had a go at this and found we couldn’t get both sets of stats working at the same time in MU (that was before the last GA code update).
Jamie, good luck with your plugin development effort. Just because WPMU might look easy from the outside doesn’t mean it is.
@james, how does this plugin differ from http://wpmudev.org/project/Google-Analytics-Plugin-For-Wordpress-MU—Revised–English
By working :) And supporter integration, general support etc.
by working?… that plugin works quite fine. Been using it for some time on our WPMU install.
even modified it a bit to pass on subdomain info. to google so the main site analytics aren’t filled relative URLs owned by other sites.
@Kong Can I see how your mods?
I’ll second that Kong :) We’d be happy to chuck you a free 12 month membership for sharing too!
Oh.. sure.. it’s not really hard to do, but here it goes –
Using the following plugin:
http://wpmudev.org/project/Google-Analytics-Plugin-For-Wordpress-MU—Revised–English
…edit rafik_ga.php
Starting after lines 38, and 53, you will notice the following code:
var firstTracker = _gat._getTracker(“‘.$site_urchin.’”);
…insert after that,
pageTracker._setDomainName(“.your.domain.here.com”);
…then, after line 67, where it says:
var firstTracker = _gat._getTracker(“‘.$site_urchin.’”);
…insert:
firstTracker._setDomainName(“.your.domain.here.com”);
Keep the first period before the domain! It’s there on purpose…
Now, go into Google Analytics, and setup the following ADVANCED filter:
Filter Type: Custom filter > Advanced
Field A: Hostname
Extract A: (.*)
Field B: Request URI
Extract B: (.*)
Output To: Request URI
Constructor: /$A1$B1
..more google documentation can be found at
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55524
Then, when viewing your google analytics for your WPMU sites, you will get to see traffic for all content with that sites subdomain preceeding it’s page URL. e.g.: instead of seeing content as /2009/02/some-page/, you will see someonesblog.mywpmusite.com/2009/02/some-page/
..makes it easy to tell which sub-sites on your WPMU are really popular.
This, however, will also record hits from your logged in users as well. I plan to add a logic check that will not display the google code if the user is logged in. I do this on other independent WP installs.
…so where do I cash in my free membership :)
Just create an account (remember not to pay) and email me yr details – you’ll be a valuable member of the community too I reckon, we’re looking forward to your perspective on things.
So James, did he won? Or you can’t say because he presented a fine free solution that does the same as your paied solution. I am sorry, but it’s really hard to me see someone get paid because he do things for free plattaformns… and that keep saying how cool is WPMU. oh well, i know.. it’s me that are wrong.