February 23rd, 2007 WordPress Google Analytics Plugin
This plugin allows you to use the powerful Google Analytics to track your Wordpress stats. It’s easily configurable to:
- Not log anything in the admin area
- Log 404 errors as /404/{url}?referrer={referrer}
- Log searches as /search/{search}?referrer={referrer}
- Log outgoing links as /outgoing/{url}?referrer={referrer}
- Not log any user roles (administrators, editors, authors, etc)
Changelog
- 04/23/2008: 1.1.0
-
- Major revamp to work better with the new Google Tracking Code. It seems that outgoing links weren’t being tracked properly.
- 04/17/2008: 1.0.0
-
- Released to wordpress.org repository
- 07/03/2007: Version 0.0.2
-
- Fixed problem with themes that do not call wp_footer(). If you are reading this and you are a theme developer, USE THE HOOKS! That’s what they’re there for!
- Updated how the admin section is handled
studge Says:
Great idea! I am going to give this a try, thanks.
Sebastian Says:
Hi ! It seems the link to your file is broken.
Where can i download to try it ?
Aaron D. Campbell Says:
Sorry, the links were broken from when I moved this from xavisys.com/blog to aaron.xavisys.com. They should be fixed now.
Jane Says:
I have installed your plug in and entered my Google code in the Options section on wp, but after over an hour I am still being told that Google cannot find the code. Whenever I have used analytics before the code has activated within minutes, am I dong something wrong?
Aaron D. Campbell Says:
Did you paste the whole code that Google provides? It should look like this:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
<script type="text/javascript">
_uacct = "UA-XXXXXXX-X";
urchinTracker();
</script>
You should see immediate results, meaning that you should see the Google Analytics code appear in the code of the site. If you don’t, send me the address to the site through the Xavisys contact us form, and I’ll take a look.
Aaron D. Campbell Says:
As it turns out, the problem Jane was having was with her template, which did not include a wp_footer() call. She fixed her template, but I also made some changes to the plugin. If wp_footer is never called, it will use output buffering to insert the code just before your closing body tag.
Christiaan Conover » Five Wordpress Plugins to Make Your Blogging Year Better Says:
[...] Google Analytics: This plugin is crucial to me, perhaps above any of the others I use. I love Google Analytics - it’s so easy to use, and it gives you so much information. However, I sometimes get a little frustrated with it in conjunction with Wordpress. When I decide I want to switch themes, I have to go through and manually paste the tracking code into each appropriate theme file, which can be frustrating, especially when I realize days later that I missed one. Also, since I’m a frequent visitor to my own blog to make a new post or whatever other reason, that can skew the accuracy of the data being presented. I’ve used the filter feature in Analytics before, but I’m not always at the same location when I access my blog, so for me it’s not that effective. The Google Analytics plugin solves both these problems. It automatically inserts the tracking code you provide into all the pages, making sure that no page view is overlooked - except, of course, for the ones you tell it to ignore. It allows you to choose what user levels not to gather tracking data from, so you won’t see all the visits you (or other authors/admins) make to the site, resulting in a more accurate reflection of the visitors to your blog. This is a must-have for any serious Wordpress user. [...]
sharewp.info Says:
WordPress Google Analytics Plugin…
This plugin allows you to use the powerful Google Analytics to track your Wordpress stats….
24 godziny – co się zmieniło | Migol's Blog Says:
[...] trójca Google", czyli kolejno: All in One SEO Pack, Google XML Sitemaps oraz WP Google Analytics. Pierwsza z nich wspomaga optymalizację dla wyszukiwarek (nie tylko Google, ale wszyscy wiemy, [...]
tayfun Says:
super.
Ryan Says:
I am an idiot at this stuff. I have analytics on my normal site (i did not install it myself, but i use it a lot), and i am trying to get it to work on the blog. Where (exactly) do I paste the code? There are many php pages on the theme editor. Any help would be appreciated.
Aaron D. Campbell Says:
If you are using this plugin, you don’t need to mess with your theme. Install the plugin, then go into your admin section to settings and “Google Analytics.” Paste the Google supplied code in the box, and set the setting however you want. Click “Update Options”
Andrei Says:
same problem as Jane .. i pasted the code and no response from Google Analytics .. pls help
thanks!
Andrei Says:
problem solved .. is was google latency i suppose .. thx anyway!
cheers!
Aaron D. Campbell Says:
Glad to hear it Andrei!
WordSkill Says:
Aaron, thanks, a breeze to get working in 2.5. Keep up the good work.
brian jones Says:
installed the plugin, set my options, pasted google code, yet they cant verify. I have tried both the “new tracking code” and the “legacy code”. will the plugin work with the new code? what do you think the issue is?
thanks
brian jones Says:
never mind, the plugin conflicts with the slideshow on the front page and our galleries. i uninstall ed
thanks
Aaron D. Campbell Says:
Brian: Sometimes it takes a while for Google to verify that they are receiving data, but if you view the source of a page, you should see the Google Analytics code being added to the page.
The plugin works with both the new and legacy code.
How exactly did it conflict? What did it do? I’ll send an E-Mail to you as well, so you can reply there if you prefer.
Ryan Says:
Thanks. I do not know how i did not see that. It still does not work though. One question, my blog is located at myurl.com/blog. i already have analytics working on myurl.com. Do i need to register a different tracking address for myurl.com/blog????? Please help.
Ryan
Aaron D. Campbell Says:
Ryan: No, you don’t need to register a different key for the same domain. You have checked the source code of a page on your blog to make sure? You should see either the Google code, or something like:
<!-- Google Analytics Plugin is set to ignore your user role -->It hooks into the wp_footer hook, so you’ll need to make sure that your theme includes the proper wp_footer() call in the footer of the page (before the </body>).
Hopefully the last three lines of the footer.php file in your theme look like this:
<?php wp_footer(); ?></body>
</html>
Steve H Says:
Thanks Aaron this is a great Plugin, just thought i’d post and say the last four lines of my footer looked like this:
Put in the line like so:
and everything appears to be working
Steve H Says:
oops..
Thanks Aaron this is a great Plugin, just thought i’d post and say the last four lines of my footer looked like this:
Put in the line like so:
and everything appears to be working
ปลั๊กอิน : StatPress เก็บสถิติคนอ่านบล็อก Says:
[...] by W3Counter ก็ต้องมี ID เว็บ W3Counter , Google Analyticator หรือ WP Google Analytics ก็ต้องมี ID ใช้งาน Google Analytics ก่อน ( ID [...]
Speedtest: Google Analytics plugins | Binary Tendencies Says:
[...] WP Google Analytics 1.0.0 [...]
Converted my blog to Wordpress | YTechie.com Says:
[...] also set up the Google Analtyics Plugin, which sets up some pretty neat tracking features. It’s even supposed to track outgoing [...]
Converted my blog from Blogger to Wordpress | YTechie.com Says:
[...] also set up the Google Analtyics Plugin, which sets up some pretty neat tracking features. It’s even supposed to track outgoing [...]
Speedtest 2: Google Analytics plugins | Binary Tendencies Says:
[...] WP Google Analytics 1.1.0 by Aaron D. Campbell [...]
Laird Farquharson » Blog Archive » Blog Updates Says:
[...] WP Google Analytics: Use Google Analytics to track site statistics [...]