Tags: Google, Releases, Website, WordPress
Google Analytics Plugin for Wordpress
November 14th, 2005, by Rich.

This is the first beta release of a WordPress plugin that can add Google Analytics to your website without you needing to code one single set of <>’s.
$latest = "0.65";
if ( $_GET['v'] != '' ) {
if ( $_GET['v'] != $latest ) {
echo('
‘);
}
}
?>
I have it running on this site and it seems to be working just fine so far.
Installation instructions
To use it:
- If you have a previous version of the plugin, delete it.
Download this file- Rename the file
googleanalytics.phpand copy it to your/wp-content/pluginsdirectory. - Enable it on the plugins page.
- Enter your Google Analytics User Account string (it’ll be something like UA-12345-6. It appears when you “Add a channel”)
- That’s it.
You don’t need to look alter the code in any way to make it run; of course you’re welcome to improve it and send me any updates for inclusion.
Features
- Zero Coding
A zero coding install enables both the default tracking and the use of different channels for specific posts. - Outgoing links
Track which outgoing links your users click on - i.e. the ones that don’t traditionally register in your logs. Separate tracking streams for outbound links that are in the main article, comments, and comment author URL’s
- Multiple Channels
Assign a specific channel to any article by entering the channel ID as metadata. i.e. simply type “analytics” as the metadata field name and the channel ID as the value and you can run a channel for each specific post
Requested Features
- Filtering the Sidebar
WordPress provides hooks for filtering articles and comments, but not for filtering the sidebar and footer. Since the sidebar often includes the blogroll there are page-exit clicks that cannot be tracked. If anyoen has a clean solution to filtering the sidebar then please speak up! - 100% Point’n'Click UI
I’ve asked on the forums to see if there’s away to automate the retrieval of the account id, so hopefully the plugin can become a configuration free install.
Assign a different channel ID to each category.
Versions
A historical list of releases.
Contribute
Please neatly tuck any feedback, comments, suggestions & requests onto the forum!


November 22nd, 2005 at 4:18 pm
November 22nd, 2005 at 7:09 pm
November 23rd, 2005 at 10:57 pm
Does you plugin track traffic from registered admins?
It would be nice if I could work on my site without registering hits.
November 24th, 2005 at 7:46 am
Hi Darryl, Google Analytics already does this, just set up a filter for your IP range. I could add it to the plugin with just a little tweak, but is there a need beyond the existing filtering?
November 24th, 2005 at 3:56 pm
Rich, I think it would be nice. For example if you access from multiple ip’s (as I do) or dial up for example with who knows what IP.
December 6th, 2005 at 6:26 am
Hi, thanks for the plugin. BTW to validate XHTML 1.0 Strict I had to change both of the “onClick” commands in the script to “onclick” (without the capital C).
(ref http://www.w3.org/TR/html4/struct/links.html)
December 6th, 2005 at 12:27 pm
Thanks Danloreye! I’ve included that in the code ready for the next release.
December 19th, 2005 at 11:23 pm
December 25th, 2005 at 8:31 pm
January 3rd, 2006 at 9:54 am