Google Analytics Wordpress Plugin

November 14th, 2005 by jr in Miscellaneous, Technology, Tools, Webdesign

Important update: Due to new tracking capabilities, I released an updated Version of the Google Analytics plugin. Grab it here.

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.


Installation Instructions

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:

40 Responses to “Google Analytics Wordpress Plugin”

  1. sysadmin Says:

    Nice… it took me just 3 seconds to install, go to google analytics click on “check status” and it showed message that it all works. Thanks, very good job indeed.

  2. joshua_ Says:

    i have a question

    in profile most be the traking code? and domain is (in my case http://www.hard-sets.nl)

    can you email me. :) for the answer.

  3. rotor Says:

    thanks a lot for your plug-in! i use it in my wp blog now :)

  4. jamie Says:

    Awesome!!! Thanks!!

  5. chz Says:

    I installed the plug-in about 7 days ago. Google tells me it is installed correctly and gathering data but it has yet to kick in and com back with any reports. Anyone else experience this much wait time?… typically me regular sites only take about 3-4 days max.

  6. 0dot Says:

    thanks

  7. frans goes blog » google analytics with wordpress Says:

    [...] Measuring traffic in such a low-traffic site as this one is probably vanity taken to an extreme, but I have tried it anyways – at least partly to understand how the various web measurements systems work. Google Analytics is a free, very comprehensive system that offers much more information than all those log analyser programs I have been trying out before. But since when I switched this blog to WordPress some time ago, I noticed a significant drop in the site visitor statistics that Google Analytics was reporting. It was only then when I realised that the Google system relies on a javascript embedded in all monitored pages, and WordPress is all database and PHP. It was not showing on the radar. Luckily, it appears that several people have figured out how to make Google Analytics work through a plugin in WordPress. I have now downloaded and activated this one from Johann Richard – lets see how it works out (and if there are actually anyone reading these notes, anyways). [...]

  8. Dennis W. Says:

    Well, I seem to be getting lots of error messages:

    Warning: Cannot modify header information - headers already sent by (output started at D:\Data\Web\vasquo.wachtel.nl\wp-content\plugins\google-analytics.php:71) in D:\Data\Web\vasquo.wachtel.nl\wp-includes\pluggable-functions.php on line 270

    What could that be?

  9. inactive life » Google Analytics Says:

    [...] I switched from StatTracker to Google Anyalytics. StatTracker seems sorta adish and doesn’t seem that organized. Plus, the charts don’t show up in Camino. So I switched to Google Anyalytics. It seems a lot more professional and organized. I’m using the plugin from taking the red pill to embed the code into my pages. The only thing is my stats are gonna be a little off, but for some reason StatCounter stopped working for me and I had to reset it because of a glitch causing me to have over 10,000 views (which is impossible). I guess I can start about when I got my new theme and see how many people saw it. [...]

  10. webmaster kaynak sitesi Says:

    very usefull plugin, thanks

  11. wosoom Says:

    Thanks a lot for this plug-in. I need to use it in my blog.

  12. andy Says:

    Excellent, thanks. You are still showing as the quickest path to get analytics working in a wpblog - good work!

  13. Giovani Says:

    I got confused with the settings on the Wordpress dashboard, please be specific on your post, since I didn’t know if I had to put “http://” on the second field or not, but yea you don’t have to.

    thank you.

  14. Photo Blocker Block Radar Says:

    Photo Blocker is the solution used to block photo radar. Just spray the PHOTO BLOCKER on to your license and no photo blocker cameras can catch you. Photo Blocker infact works and will prevent any photo radar from picking up any license plate. This system is better than getting a photo radar ticket. blockradar.com has the right product.

  15. Joe Says:

    What I want to do on my blog, is every few hours take the oldest post and move it to the front of the queue, all automatically. Anyone know if there is a plugin that can do this or a simple way to set up another plugin to do this (use my own feed perhaps)? Thanks.

  16. Theme and plugins used on michaelvisser.com.au at Michael Visser Says:

    [...] Google Analytics Easily embed Google Analytics into your blog. [...]

  17. BradLucas.com » Blog Archive » Adding Google Analytics to a WordPress site Says:

    [...] I followed the following after reading Unzip the google-anlytics.tgz file to get google-analytics.php. [...]

  18. Na Onda Do WordPress » MiSC Weblog Says:

    [...] 8° - Audiência importa!? Se você não liga só para comentários, mas liga para o número de visitas, então use plugins de estatísticas como o WP-ShortStat, ou o Google Analytics Wordpress Plugin. Os dois lhe dão muito mais que o número de visitas, dão um perfil muito bom dos seus visitantes. Não precisa sujar o layout do seu blog com figuras de quantos acessos você teve. Isso importa apenas a você, não acha? O “muito” você quer só nas visitas, no layout “menos é mais”. [...]

  19. ojas Says:

    The Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

    it wont detect it….whats wrong?

  20. jr Says:

    Hi ojas

    Maybe you should wait some more time. The code seems to be included correctly on the page. something to check for is maybe the tracking code from Google. But I guess you entered it correctly?

    Regards jr

  21. Jeff Lawrence Says:

    We’re looking to evaluate the different Google Analytics word press plug ins on our upcoming blog in the next few weeks. Thanks for providing this, and I’ll be sure to provide feedback!

  22. Msoly - Another Social Networking Blogger » Tracking Outbound Links Says:

    [...] I did some more digging and it turns out that there is a plugin for wordpress that adds the onclick javascript automaticly. All of this is explained here [...]

  23. Geordnete Liste aller im Blog Karneval vorgestellten Wordpressplugins » Artikel » NSAHs Blog Says:

    [...] Google Analytics: bindet Google Analytics Code ein vorgestellt von Der Korsti [...]

  24. links for 2007-05-08 - der Wendländer Says:

    [...] Google Analytics Plugin (tags: wp worpress plugin) [...]

  25. Theme and plugins used on michaelvisser | Michael Visser Says:

    [...] Google Analytics Easily embed Google Analytics into your blog. [...]

  26. WP Plugins DB » Blog Archive » Google Analytics WP Plugin Says:

    [...] Visit [...]

  27. Wordpress Plugin Google Analytics » Trendvisor Designlab Focus Says:

    [...] Google Analytics Wordpress Plugin auf taking the red pill [...]

  28. dogdin Says:

    Thanks for the plugin! I’m new to self-publishing a sites (make that people) like you are a huge help!

  29. jasper Says:

    I installed your plugin like described, but I don’t get GA to recognize the code. I get this message on the GA website: The Google Analytics tracking code has not been detected on your website’s home page.

    I tried with a normal html index page and that works fine.

    Please email me the answer.

    Thanx in advance. Jasper

  30. mstgngr Says:

    http://wmwebtr-odullu-seo-yarismasi.wm-tr.com

  31. links for 2007-07-29 at jordoncooper.com Says:

    [...] taking the red pill - » Google Analytics Wordpress Plugin (tags: plugins software WordPress Google statistics) [...]

  32. Mike Sukmanowsky Says:

    Great job! I actually like the simplicity of the setup - it’ll make it easier for me to mess around with later on. :)

  33. Geordnete Liste aller im Blog Karneval vorgestellten Wordpressplugins « Artikel « Nils sah's Says:

    [...] Google Analytics : bindet Google Analytics Code ein vorgestellt von Der Korsti, m-blog [...]

  34. Installing Google Analytics for Wordpress | Michael Visser Says:

    [...] Google Analytics Wordpress Plugin v1.1 from taking the red [...]

  35. taking the red pill - » Google Analytics WordPress Plugin V1.2 Says:

    [...] Google recently added a new tracking code for Google Analytics. In order to enable this, I updated my popular Google Analytics Plugin for WordPress. [...]

  36. taking the red pill - » Most popular posts ever Says:

    [...] Google Analytics Plugin [...]

  37. shabooty Says:

    thanks! now i just have to wait 24hours for data to show up eh?

    -shabooty

  38. marcellus Says:

    Hi, I want know if the plugin add visit when the admin open the wordpress site. Or if I can choose this. Because I dont like when Google Analytics count my visits on my own blog! =P

    Sorry my poor english! =D

    Thanks!

  39. Wordpress Plugins Gids : Google Analytics Plugin :TOKKEL.be Says:

    [...] kan de plugin hier downloaden. TOKKEL.be is een project van Seo Tips & [...]

  40. WordPress-Plugins: Seht ihr den Wald vor lauter Bäumen nicht? » Der Korsti bloggt Says:

    [...] Google Analytics Fügt automatisch den Google Analytics-Code auf jeder Seite ein. [...]

Leave a Reply