Monitoring multiple Google Analytics profiles

Google Analytics is a great tool! I love every little bit of it since the day I discovered it.
But sometimes you just want to know how your websites are doing at a glance. I don’t care about all the other stuff like bounces, time spent on site, keywords, etc.
I just want to know if traffic is constant and if I see spikes or drops, then I’ll investigate.

What I needed was this:

google-analytics-multiple-profiles-in-one-page1

click for larger view

Little rectangles with the websites I want to monitor and the data for unique visitors per month, in the last 12 months. Also, a link to the Analytics profile and a number that calculates average monthly visits. That’s it! (You can still do A LOT more if you wanted, but I didn’t) If you were looking for something like this yourself, read on.

All of this is based on the Google Analytics PHP API class and Google’s own API
There’s also a little PHP/HTML/CSS of my own involved to make it look nice.

You can extend this a lot more if you wanted. You can certainly change the way it looks via CSS and also, you can extend the info that is shown in many many ways. You just have to understand the API query inside of ‘profile_repeater.php’ (included below) and, depending on what you want to achieve, do a little bit of reading on Google’s Dimensions and Metrics. Also check out the comments inside the ‘index.php’ and ‘profile_repeater.php’ files.
Note that the last (current) month is a different color. That’s to help you understand that statistics for the current month can’t really be compared with the past months until the month is over.

So, just create a new folder on your web server, copy all the stuff below in there, change the username and password (index.php) and it should work.

The download link below will get you:

» index.php (view txt version) – this initializes the class and the graphing function and this is where you put your google analytics info and (optional) excluded profiles;
» analytics.class.php (view txt version) – the engine of it all, not created or changed by me;
» styles.css (view txt version) – a bit of css to make it pretty;
» profile_repeater.php (view txt version) – this is the individual profile module that shows you the data and graph for each profile.

Have fun!

Download all (.zip)

Tags: , , , , , ,

One Response to “Monitoring multiple Google Analytics profiles”

  1. [...] wrote about monitoring multiple analytics profiles back in 2010. A lot has changed since… The Google Analytics interface has changed, we now have to deal [...]

Leave a Reply