Google launched its [Google Analytics] Service and I took the occasion to add Google Analytics to my blog. Because changing the template is bad practice, I thought a plugin would be handy. Therefore I present the [Google Analytics WP Plugin v1.1].
Just drop the
google-analytics.php file into your
wp-content/plugins folder and activate the plugin in the admin. Go to the “Google Analytics” options page under “Options” and set the value of the “Google Analytics Profile” to the value of the
_uacct variable that’s defined in your Google Analytics Profile for your blog. (E.g. “UA-55418-1” in the case of this blog).
The plugin will then add the necessary code at the right position in the HTML header of your blog’s pages.
[Update]: Since the publishing of this plugin, I found at least three others that did the same thing as I:
So, you can even chose which plugin you want to use. I guess, mine’s by far the most “hackiest” of them all. ;)
[Update 15.11.2005]: I updated the plugin to let you specify the “_udn” attribute as described in How do I track all of the subdomains for my site in one profile? . A new field “Domain” has been added to the admin panel. If filled-in, the value (e.g. mycvs.org in case of this blog) will be set in the script. Leave this field empty and the plugin will behave as before. As one reader pointed out: You must not put “http://” in front of the domain name.
[Update 16.11.2005]: For all those experiencing delays in analysis, here’s what Google has to say :
I have installed Google Analytics, but all or some of my data is missing from my reports.#
Update: 5:22 PM PST. Tuesday, November 15th, 2005
Currently, report updating for Google Analytics is experiencing delays. As a result, you may not be seeing any data in your reports even after implementing the Analytics tracking code. We are currently in the process of updating all reports. You should be able to see these updates in several hours. While this is going on, you may notice different reports updating at different rates. Once this process has completed, all data should be restored to your profiles. Please be assured that this update process has no effect on data collection. We apologize for any inconvenience. This reporting delay is associated with unexpected demand for Google Analytics. Under normal circumstances, the data in your reports will be at most six hours old.
‘nuff said! – Luckily, I just got my first results:
[Google Analytics]: http://www.google.com/analytics/ “Google Analytics”[Google Analytics WP Plugin v1.1]: http://mycvs.org.nyud.net/wp/wp-content/google-analytics-1.1.tgz “Google Analytics WordPress Plugin”