So I’ve finally got around to completing my first WordPress plugin. It’s a google analytics dashboard to get a nice overview of your site’s stats without having to go to the Analytics page. The charts are all displayed using a very cool project Open Flash Charts 2.
I also used the Google Analytics PHP Interface by Stig Manning to pull the google analytics data.
Installation is very simple, unzip the package and upload to your plugins directory. Then under the “Settings” Menu, go to “GA Configuration” and enter in your accounts details. The plugin can optionally add the Google Analytics code to the footer of your site if its not already included.
A few FAQ from the readme file:
Why do I need to enter my username and password?
The google analytics api requires authentication and this is the cleanest way to accomplish that.
What’s my site’s Profile ID?
The sites Profile ID can be found by viewing the Google Analytic’s reports for the site. Then in the URL the Profile ID can be found after id= such as id=1234567. 1234567 would be the sites Profile ID.
What’s my site’s Web ID?
The optional Web ID is found in the list of your site profiles after the name of the site. It will look something like UA-1234567-0. You only need to enter this if you wish for the plugin to include the google analytics code into your sites footer to begin tracking stats.
Here are some screen shots of the plugin in action:


A few notes:
- Please consider this a beta version. There are still a few bugs to work out. If you come across one let me know in the comments.
- There is currently a JavaScript error in IE. If you figure it out, please let me know so I can update the plugin. Hopefully I’ll figure it out soon.
- This plugin does NOT work in environments using php4. The class to gather the Google Data is written using php 5 functions and can not be changed. If I find a good alternative or have the time to rewrite the class, I’ll update the plugin.
- Someone has said they can’t see the graphs. I can’t replicate this issue but it might have something to do with not uploading the swf files in binary mode. If someone else has the same problem let me know.
I’ll be adding more reports and more details when I get the time. Enjoy and let me know what you think.

Very cool, the GA API is going to open a lot of doors for apps like these. Thanks!
Very nice.
One minor “bug” though: I wanted to use this with a new domain (fresh start) and I get a lot of PHP errors thrown at me – “Division by zero”. Maybe you want to add a check if the page has had any hits/visitors at all?
Good catch, I threw some checks in but didn’t get a chance to check it with a site with no traffic yet, I’ll set one up.
I also fixed a typo which caused the Pages/Visit chart from switching to the correct data.