Google Analytics for WordPress reaches version 4

Google Analytics has gotten so many new features in the last year, that the only way I could incorporate those into my Google Analytics plugin, which has been downloaded 4,024,510 times, was by doing an almost complete rewrite. That’s why today, I’m proud to announce version 4.0 of this plugin.

What’s new with this Google Analytics plugin?

Asynchronous tracking

First of all, this new version 4.0 switches to the new asynchronous tracking method. This new tracking was also the reason it took a while to get this version out the door: there were quite a few bugs to work out; tracking by the beta was not reliable for a while.

What’s the advantage of the new tracking you ask? Why bother switching? Well, there are three reasons, as listed by the Google Analytics blog:

  • Faster load times for your web pages due to improved browser execution of the tracking code.
  • Enhanced data collection & accuracy.
  • Elimination of tracking errors from dependencies when the JavaScript hasn’t fully loaded.

If you want to know more about asynchronous scripts, check out this blog post by Steve Souders, in which he explains the concept and what it means for page load times. The short version: a normal script blocks other objects on your page, like images, from being loaded until it has been fully loaded. An asynchronous script allows for those other objects to be downloaded at the same time.

Custom Variables

Google launched the custom variable support in October 2009, and I’ve been playing with ways to use these in tracking ever since. Custom variables are a way to add data about the current page, the current session or the current user in your tracking, which you can use for some very cool things.

I’ve been thinking and working with guys like my buddies Frederick Townes and Justin Cutroni about what you should and could be tracking. It wasn’t easy, which is why I’m very proud to show you this settings panel:

Google Analytics Configuration

Google Analytics Custom Variables

As you can see in the screenshot, you can segment by:

  • Logged in users: speaks for itself, very useful on BuddyPress sites etc: where do people that are logged in go, where do others go. It stores the users primary user level in the variable, so you can even segment for just “subscribers”. (There’s an advanced option to ignore users of certain levels should you want to btw)
  • Author name: track page views per author.
  • Single category: if your posts are in only one category each, this allows you to track views per category.
  • All categories: track multiple categories per post, a bit harder to view in Analytics, but could still be useful.
  • Tags: track all tags for each post, has its limits but might be useful.
  • Publication year: see what’s doing good and bad, more specifically whether your old posts are still getting traffic.
  • Post type: especially with the new custom post type features in WordPress 3.0 this is very useful: if you’ve got movies, actors etc. set up as custom post types, this allows you to track how many page views each post type got.

So you could run reports showing which authors do better, which categories and / or post types get more pageviews and so on. This will provide you with the kind of analysis you need to improve your blog. I hope you’re starting to get why I’m so excited about this release. But wait, there’s more.

Google Analytics API integration

Where in the past I’d ask you to enter your “UA ID” from the backend, you can now simply click a button, authenticate with Google Analytics, select the right account and then the right profile and start tracking! Check out how easy that is:

Google Analytics Configuration

Google Analytics Configuration

Of course you can still enter the UA ID by hand if you want to, just check the box in the lower left of the screenshot and you’ll get an input box to enter the UA ID.

E-Commerce integration

This plugin now fully integrates with both WP E-Commerce and Shopp: for both of these plugins it tracks sales using e-commerce tracking, allowing you to track where people that bought something came from, how they went about your site and which pages triggered them to buy.

All you have to do is install the plugin, and it’ll automatically detect whether you’re running one of these two plugins. You’ll then get a box like this:

WP e-commerce analytics integration

WP e-commerce analytics integration

Event tracking

In the past this plugin used page views to track downloads and outbound clicks, thereby inflating page views. I started doing this before event tracking even existed, but of course this needed to be changed. The plugin now uses event tracking for this by default, but, if you want to, you can just check a box and it’ll switch to using page views again. You can also switch to page views just for downloads, to keep your goals working the same way.

An API for this plugin

This plugin adds a couple of filters so you can add your own tracking from your own plugins without having to hassle with the rest of the tracking. The 3 filters are:

$push = apply_filters('yoast-ga-custom-vars',$push, $customvarslot);
$push = apply_filters('yoast-ga-push-before-pageview',$push);
$push = apply_filters('yoast-ga-push-after-pageview',$push);

Custom variables are hard to deal with, as they need to be in the same “slot” all the time, that’s why the $customvarslot is passed along.

Go get the Google Analytics for WordPress plugin

I have to believe that I’ve convinced you by now, so please go get the plugin. Please do let me know in the comments when you’ve upgraded, and what you think I should be adding!

Tags: , , runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

149 Responses

  1. DarrenBy Darren on 7 July, 2010

    Oh damn :L since launching my new site I’ve become too much of a stats whore :L This wont help that erm addiction.
    Joke aside, thanks for the update :D

  2. Ricky BuchananBy Ricky Buchanan on 7 July, 2010

    This is fantastic! Thanks so much for the great plugin – it’s on my “must install for every site” list and I wouldn’t know what to do without it :) Your work is muchly appreciated.


  3. Nick SoperBy Nick Soper on 7 July, 2010

    Brilliant! Installation on the next site I build is guaranteed.

  4. EdwinBy Edwin on 7 July, 2010

    Great work, Joost. I’ve been using your plugins for some time now. Can’t wait to try this new version. Keep up the good work

  5. vpBy vp on 7 July, 2010

    It seems like a great update! Congrats on your hard & clever work! I updated most of my sites already and it worked just fine, except for one of them in which I get the following error message:

    “Fatal error: Cannot use string offset as an array in /home/consev/ on line 266″

    Any idea how to solve it? Thanks!

    • Joost de ValkBy Joost de Valk on 7 July, 2010

      Hmm try to re-authenticate with Google Analytics, think that’s a problem in the feed… If that doesn’t solve it we’ll have to dive deeper :)

      • vpBy vp on 7 July, 2010

        Thanks for your quick reply! I’m afraid it didn’t solve it. I even logged in & out at G. Analytics with a different account, and then again with the right one, but same result.

        • Joost de ValkBy Joost de Valk on 7 July, 2010

          Hmm that sucks. Ok I’ll dive in deeper. For now, go to your Google Analytics, get the UA code for the right site, and enter it manually by checking the box on the left.

          • OnelargeprawnBy Onelargeprawn on 7 July, 2010

            Hi Joost,

            Thanks for making this great plug-in. I too have gotten the fatal error. Whenever I go to another section of WordPress, the warning says “Google Analytics is not active. You must select which Analytics Profile to track before it can work.” but whenever I click the link, it takes me back to the fatal error.

          • vpBy vp on 7 July, 2010

            The problem is I cannot access the plugin configuration anymore. The error message appears just after clicking here:

            “Google Analytics is not active. You must select which Analytics Profile to track before it can work.”

          • Joost de ValkBy Joost de Valk on 7 July, 2010

            Yikes. OK, please ping me over email (joost – yoast . com) I’d need to see any of these installs as an admin with FTP access, so I can quickly see what’s going wrong…

      • LVCBy LVC on 7 July, 2010

        I’m getting the same error.

        • Joost de ValkBy Joost de Valk on 7 July, 2010

          Just emailed both of you, will have to figure this one out. Could it be that there’s only one site in your profile?

          • JRBy JR on 7 July, 2010

            I have the same problem. I did the update, was prompted to authenticate. Now I get error message saying, “Google Analytics is not active. You must select which Analytics Profile to track before it can work.”

            If I try to select it again I get put in the Tools>Google Analytics page and the screen is basically blank. The title is at the top, “Google Analytics for WordPress Configuration” and that’s it.

            To answer you question above -> yes, There is only one site on my profile.

          • LucasBy Lucas on 7 July, 2010

            The same happened to me. And I only have one site in my google analytics profile…

    • Joost de ValkBy Joost de Valk on 7 July, 2010

      Ok I just solved the issue and released 4.0.1, it should be available on within 10-15 minutes. Please do let me know here whether that fixes it!

      • LucasBy Lucas on 7 July, 2010

        Thank you!
        The plugin is working again.

      • LVCBy LVC on 7 July, 2010

        Seems to work now. Thank you!

      • vpBy vp on 7 July, 2010

        It works like a charm now. Thanks a lot!

      • MOCHIMADdotCOMBy MOCHIMADdotCOM on 14 July, 2010

        I just updated as of 14 July and get that error. Furthermore, it did something to my analytics account and now the Analytics settings page in Google itself cannot find my list of nine sites that I track. The plug-in made me re-authenticate, but after doing that yielded failure, I manually entered the UA tracking code. I don’t understand why the update forced the reauthentication. It remains to be seen if I lose stats over the next couple of days.

  6. PallabBy Pallab on 7 July, 2010

    Sweet! Was waiting for a plugin with async tracking.

  7. richardbaxterseoBy richardbaxterseo on 7 July, 2010

    Brilliant, Joost – this is just what I’ve been looking for. You’re a legend!

  8. Luciano PassuelloBy Luciano Passuello on 7 July, 2010


    This plugin is clearly superior to the plugin I currently use (Ultimate Google Analytics plugin — which is also server-based).

    Actually, the only reason I still use that plugin is because of the ability to track outbound links in my sidebar widgets. All I need to do is to filter widget text by using a function in the plugin:

    add_filter( 'widget_text', 'uga_filter' );

    Does your plugin offer similar functionality? Is there a way I can filter widgets like that? Are there any alternatives to track items outside the main content area?


    • Joost de ValkBy Joost de Valk on 7 July, 2010

      Hmm it doesn’t support that right now but that’s quite easily added, as the filter function does exist, the filter itself just doesn’t :)

    • Joost de ValkBy Joost de Valk on 8 July, 2010

      Ok I released 4.0.2 and it contains this new filter, nothing you have to do, it’ll filter text widgets automatically!

      • Luciano PassuelloBy Luciano Passuello on 9 July, 2010

        Wow, this is A-W-E-S-O-M-E, Joost!
        No excuses for not using your plugin anymore! :)

        Thanks a bunch!

      • Luciano PassuelloBy Luciano Passuello on 9 July, 2010

        Hi Joost,

        I just tested this feature and it works fine, except that the tracked links don’t seem to honor the “Internal Links to Track as Outbound” option when placed in a text widget.

        I tried the exact same link in the same page, one in the content and the other in the sidebar. When in the content, an OnClick event was added, when in the text widget, it didn’t.

  9. TseneBy Tsene on 7 July, 2010

    Excellent work. Keep coding ;)

  10. Joost de ValkBy Joost de Valk on 7 July, 2010

    4.0.1 is available now, so for the few of you having issues please update and let me know if that fixes it :)

  11. André ScholtenBy André Scholten on 7 July, 2010

    Great Yoast, I know a lot of users that are using a plugin to imlement Google Analytics in WordPress. You’re giving them all kinds of cool new information. And a better/faster tracking technology that won’t slow down their sites.

  12. Illiya VjesticaBy Illiya Vjestica on 7 July, 2010

    Excellent update Joost, this will definitely come in handy.

    Not only was your plugin the very best Google analytics plugin for WordPress, now it’s even better!

    Keep up the great work!

  13. HannesBy Hannes on 7 July, 2010

    Sounds good. I was wondering when you were going to support the asynchronous code and event tracking ;)

    But I checked the source of this page and it looks like you’re not adding the Analytics code right before the closing of the head tag as instructed by Google.

    You’re loading jQuery and other javascript files after running the Analytics code. Any reason for that? Or will you fix this in the next update?

    • Joost de ValkBy Joost de Valk on 7 July, 2010

      I’m doing it this high on purpose: if any of the other scripts loading on a page break (and trust me, this happens a lot when you have almost 1 million users), the tracking will still be valid.

      • HannesBy Hannes on 7 July, 2010

        Alright, fair enough. I was just wondering :)

  14. NicolasBy Nicolas on 7 July, 2010

    Upgrade worked well for me. I was just wondering why you place the tracking code in the header … isn’t it better to place that stuff in the footer? Love all your Plugins … thanks for the update!

    • Joost de ValkBy Joost de Valk on 7 July, 2010

      Not for asynchronous scripts, for normal scripts you’d be right though :-)

  15. RolandsBy Rolands on 7 July, 2010

    Nice! I was already using my own small solution for WP GA, now just merged them.

  16. Jesse McFarlaneBy Jesse McFarlane on 7 July, 2010

    Looks great as always Yoast!

  17. The Longest Way HomeBy The Longest Way Home on 7 July, 2010

    Hi Yoast,

    After listening to your podcasts, and reading your work here. I must say you really have put great effort into this plug-in.

    Whereas most can’t wait to be first to release an update, you took your time in doing it. And, did it right. (something others can, & should learn from)

    Just wanted to say thank you.


  18. AndreasBy Andreas on 7 July, 2010

    Installed! Actually the first time I use a Plugin for my Analytics Code, I used to manually insert it into the footer template. The features mentioned here are just great.

  19. bryan BlissBy bryan Bliss on 7 July, 2010

    Usually i dont even read all the comments in a blog , so many blog comment spammers, the attaboyt and thank you” for a link gets abit much’
    but in this case i wanted to see how this upgraded version is being received. i generally dont want to put my blog into the guinea pig testing mode until upgrade related bugs have been worked out.
    I thought it was pretty cool to see the evolution of a bug report and instantaneous solution, with a brand new version uploaded to wordpress so quickly.
    Alot of the code and tech escapes me or confuses me, so its nice to see that if sopmething DOES go wrong, you’re there on the spot backing up, re-examining and improving your work.
    this commitment to ones own quality control should be more common.
    I dont understand whats behind the plugin, but ill install it anyways (later) and be glad you made it work better.

  20. Eric James StoneBy Eric James Stone on 7 July, 2010

    Upgrading loses the currently set UA code. That means Google Analytics does not work on the site after upgrade until either the link with Google’s API is set up or the UA code is manually inserted. Wouldn’t it be better to keep the old UA code and use it until the plugin is set up to use the API?

    • Joost de ValkBy Joost de Valk on 7 July, 2010

      It would be, but for several reasons I can’t rely on the old settings.

  21. Savvy ChickBy Savvy Chick on 8 July, 2010

    Thanks, Just updated to the latest version. :)

  22. RamoonusBy Ramoonus on 8 July, 2010

    Joepie de poepie ;-)

    Thanks chap! You just made my day

  23. TimBy Tim on 8 July, 2010

    An excellent plugin, which now is even better.
    Just one feature request: Please support the “anonymizeIp” function from the admin panel.
    At least for us here in Germany it is essential not to collect IP addresses.

    • Joost de ValkBy Joost de Valk on 8 July, 2010

      Ah, yeah, will add that in the next release!

    • Joost de ValkBy Joost de Valk on 8 July, 2010

      Ey Tim, I just released 4.0.2 and it contains this functionality :)

      • TimBy Tim on 14 July, 2010

        Hi Joost,

        there is a bug in the anonymizeIp feature. The generated code should be
        Without _gat it won’t work. You can check this by tracing the call to with httpfox. The URL should contain a “aip=1″ if IP anonymization is enabled.

  24. Rune RisomBy Rune Risom on 8 July, 2010

    Fantastic stuff Joost! The previous version worked like a charm and v4 looks 100 times better. Great job!

  25. GaryBy Gary on 8 July, 2010

    Thanks Yoast…
    Have to admit to being a bit worried about performance implications of placing the tracking code in the header. I’ve measured placing the code both in the header and footer with both Google Pagespeed and Yahoo YSlow.
    On YSlow my performance reduced by 1/100 with the code in the header whereas in pagespeed my score improved by 2 by having the code in the header!
    Nice! Thanks.

  26. Ann DonnellyBy Ann Donnelly on 8 July, 2010

    It’s a great plugin – also a must have for all my sites. Glad to see you’re working on it. Thanks.

    Upgraded one site from back end with one click. It was a little awkward to have to re-enter in some settings though. Like I wanted to keep /outbound/ for consistency. As I have a number of sites to upgrade now, it’d be handy for that to be held through upgrade if possible.

    I entered the GA code manually cos I was thinking it would be better if site has other admins or was handed over to someone else. Is that an issue?

    Was hoping that clicking of email links might also be included as well as other links — have a site with links to members emails and it’d be nice to show how many clicks there are. (I’ve held off adding a tracking code manually to each link.) Since I installed your plugin to that site it’s great that client can generate reports to show their members how many clickthroughs they get!

    • Joost de ValkBy Joost de Valk on 8 July, 2010

      tracking mailto: links will be supported in the next version, added it last night :) If you’ve got outbound click tracking on it’ll automatically track those with prefix “mailto” and then the email address.

      • Ann DonnellyBy Ann Donnelly on 8 July, 2010

        Phew! Glad I didn’t go and add it manually to all the 1,000s of email addresses on the site! :-)

        Oh, and can you add encryption too! :-D

        (I really need to learn php.)

        • Joost de ValkBy Joost de Valk on 8 July, 2010

          encryption of what?

          • Ann DonnellyBy Ann Donnelly on 8 July, 2010

            …email addresses so that spambots don’t harvest them. Plugin I was using for that also encrypts regular links and I get loads of 404 errors showing in Google Webmaster Tools, so thinking not a good thing. Don’t like using plugins unless I can understand the technology at least a little — or they come from a trusted source. I’d try to avoid listing the email address, but this is a directory and the emails need to be easily accessible.

          • Joost de ValkBy Joost de Valk on 8 July, 2010

            won’t be able to do that, unfortunately, as that goes beyond the scope of this plugin.

    • Joost de ValkBy Joost de Valk on 8 July, 2010

      Ok Ann, I released 4.0.2 a few hours ago which contains the mailto tracking :)

  27. TODHDBy TODHD on 8 July, 2010

    I like this update because it allows me to manage my analytics inside of WordPress

  28. FoxyBy Foxy on 8 July, 2010

    Awesome plugin. I really appreciate all your efforts to get this to version 4.0! :)

  29. Norm#By Norm# on 8 July, 2010

    Hi Joost,
    thanks for this wonderful plugin, it seems to have a problem with my site tho.. actually im having two wordpress sites, both on the same domain. So far everything was working fine and admins (me) were not tracked. After the update tho, my main site started to track me although I am a logged in admin and yes, I told the plugin not to track admins. The plguin works correctly on the other install. What am i doing wrong?

  30. GunaxinBy Gunaxin on 9 July, 2010

    Nice work on the plugin, this has some great features that I’ve been looking for, and previously implemented by modifying your old version. On thing in particular is the ability to use custom variables to track by author. However I was wondering if you would be able to help us a bit more with how to read these reports. I currently don’t see anything listed under Visitors / Custom Variables. I can setup an advanced segment for each individual author, and that works, but I can’t figure out how to just get a report listing the performance of ALL authors. Any thoughts?

  31. Brian at Arctic Llama, LLCBy Brian at Arctic Llama, LLC on 9 July, 2010

    Thanks for the update. This is the only plug-in that has ever worked for me when it comes to tracking AdSense, which is the really important thing to me. Well, that and the keywords that bring people in. I’ve got this installed on all my best performing websites (which is why I’m glad it now defaults to just using the UA that is already configured instead of having to re-set it up.)

    What I really think is amazing is the both the speed and care with which you support your stuff. Just following along in the comments above I see two very quickly released updates to address both a potential issue, and a feature request. You don’t get that much anywhere else.

    Thanks for this plugin, and for all the unbiased wisdom you’ve dolled out over the years.

    Brian (Arctic Llama Freelance Writing)

    • Joost de ValkBy Joost de Valk on 9 July, 2010

      Thx for the positive feedback Brian!

  32. AustinBy Austin on 9 July, 2010

    Joost, another great piece of work! Can you explain how I can use your new API feature to add the setDomainname? I want to remove the cookies generated by Google Analytics from my subdomain.


    • Joost de ValkBy Joost de Valk on 10 July, 2010

      setDomainname is actually a feature of the plugin, just have a look under advanced settings.

  33. Udegbunam ChukwudiBy Udegbunam Chukwudi on 10 July, 2010

    The plug-in works pretty well and I love it. Is there a way of making it work on wordpress pages within the same domain?
    I’m also looking forward to your response to Justin’s question about cookieless subdomains.
    Cheers and thanks for an awesome plug-in ;-)

    • Joost de ValkBy Joost de Valk on 10 July, 2010

      making it work on wordpress pages within the same domain

      I don’t get what you mean, could you be a bit more verbose? :)

      • Udegbunam ChukwudiBy Udegbunam Chukwudi on 10 July, 2010

        Ooops! I meant non-wordpress pages ;-)

        Sorry about that. Here’s what I mean. My site’s main page and 404 page were created using Dreamweaver. Only my blog uses wordpress. Now I’ve heard that there are some analytics plug-ins that could help me track both pages on my blog (which was created using wordpress and so functions beautifully with you plug-in) and @ the same time track my main page and 404 pages?

        I hope that explains it better ;-)

        The setDomainname feature doesn’t really work well.

        Instead of _gaq.push(['_setDomainName', '']); it does this _gaq.push(['_setDomainName', '']);. Please notice the dot before www in the second code and this wrong according to Google Analytics

        Hope you can help out. Cheers and have a great weekend

  34. IanBy Ian on 10 July, 2010

    Hi Joost

    Thanks for this upgrade to the plugin, I was a little worried to begin with when it didn’t seem to want to play but when you released an updated version in worked immediately.

    I’m a great fan of the podcast and listen to it either walking the dog or in the car, over the months it’s saved me a lot of time and effort and given me some fantastic starting points for new ideas.

    Just one question, we have a client site which uses wp-ecommerce and the plugin automatically detected it. E-commerce now appears in the sidebar of Google analytics, having enabled it according to your instructions. This doesn’t however seem to pick up any data, could you give me any pointers as to why not or tell me where I could find out a bit more. This would be a brilliant way to track sales data.

    Thanks again for your plugins and also the info that comes from the site and the podcast.


  35. vanni linuxBy vanni linux on 10 July, 2010

    Thanks for sharing this ..i love word press

  36. freelancehyderabadBy freelancehyderabad on 11 July, 2010

    Realy awesome plug-in thank you

  37. Danny GavinBy Danny Gavin on 11 July, 2010

    We have upgraded the plugin – however – there for the past 2 days.. Friday and Saturday, Google
    ANalytics has not been picking up any traffic from our website. I am pretty sure it has to do with the upgrade, can you please suggest what I need to do to get my tracking up and running again.


    • chrisBy chris on 11 July, 2010

      Same problem here I have had no traffic tracked for the past 2 days after updating.

    • Joost de ValkBy Joost de Valk on 11 July, 2010

      have you both re-configured the plugin? Are the websites that aren’t tracking the websites you’ve linked?

      • chrisBy chris on 11 July, 2010

        Yes, I even manually entered my UA code

        • Joost de ValkBy Joost de Valk on 12 July, 2010

          Could you upgrade to the just now released version 4.0.3 and check if that fixes it for you?

    • Danny GavinBy Danny Gavin on 11 July, 2010

      I manually entered the codes.. and it seems to be working

  38. Danny GavinBy Danny Gavin on 11 July, 2010

    How do we reconfigure the plugin?

  39. o.m.By o.m. on 11 July, 2010

    brilliant my friend. you’re slowly growing into an empire :)

  40. JayBy Jay on 12 July, 2010

    I had used this plugin for ages and always regarded it as a top-notch plugin for WordPress users. I did get one update recently that lost my Analytics account–I had to reestablish the connection.

    The next day, I received another update (maybe this past week), which I upgraded to. For some reason, this update caused my site do redirect to Quantcast. The only way that I could fix this problem was to deactivate the plugin.

    • Joost de ValkBy Joost de Valk on 12 July, 2010

      That sounds like another plugin’s javascript is erroring out, did you upgrade multiple ones? Quantcast doesn’t even exist as text in my plugin…

  41. cijayBy cijay on 12 July, 2010

    Great plugin – make it so easy to work on and having many features as well.

  42. Joost de ValkBy Joost de Valk on 12 July, 2010

    I just released version 4.0.3, check out the changelog here, one bug that some of you might be dealing with got fixed in it, so please upgrade.

  43. OslobådenBy Oslobåden on 12 July, 2010

    It’s nice with all of the new features for Google analytics. It’s by far one of my favourite free programs when it comes to data from my website.

  44. Rafael from iloveplanes.comBy Rafael from on 12 July, 2010

    This plugin is off the chain! I love that I can quickly see the stats that matter to me.

    Hartelijk dank Joost!

  45. LisaBy Lisa on 12 July, 2010

    Is there a place on the dashboard or backend of WP where we can view the google stats OR do we have to log into google analytics all the time in order to see?

    • Joost de ValkBy Joost de Valk on 12 July, 2010

      You’ll have to log into Google Analytics, or, even better, install the awesome MailChimp Analytics360 plugin, which can show Google Analytics straight on your dashboard. You do not need a Mailchimp account for that plugin to work by the way.

  46. MommyBy Mommy on 12 July, 2010

    What a great update. Site speed has increased and pageviews are reported more accurately.. x

  47. SmetrBy Smetr on 12 July, 2010

    Hi Yoast, thank you for your great plugin, but the ecommerce tracking doesn’t work. I’m using the wp ecommerce plugin the actual version. Everything is working very well, just only the ecommerce tracking track no sales!

    • Joost de ValkBy Joost de Valk on 12 July, 2010

      Have you enabled ecommerce tracking in the backend?

      • IanBy Ian on 12 July, 2010

        Hi Joost

        I’m also having the same problem, see my earlier post. I have ecommerce enabled in Google Analytics and your plugin detected that I had wp-ecommerce installed.

        Is there somewhere else that it needs enabling? Which backend are you referring to.

        • Joost de ValkBy Joost de Valk on 12 July, 2010

          Well there’s a new section in the bottom of the google analytics admin panel where you should check one box.

          • IanBy Ian on 12 July, 2010

            I’ve done this in the Google account:

            The first step of tracking e-commerce transactions is to enable e-commerce reporting for your website’s profile:

            1. Sign in to your account.
            2. Click Edit next to the profile you’d like to enable.
            3. On the Profile Settings page, click Edit next to Main Website Profile Information.
            4. Change the E-Commerce Website radio button from No to Yes.

            And in the admin panel in the plugin I’ve checked the box that says:

            Enable transaction tracking:

            Could it be something to do with the fact that we are using paypal payments standard as a payment provider.

            I’d love to get this working as it would just be the icing on the cake for our analytics reports to the client.

          • Joost de ValkBy Joost de Valk on 12 July, 2010

            Hmm ok Ian, that’s about all you should do indeed. Let me connect with you through email and see if we can get this fixed.

      • SmetrBy Smetr on 13 July, 2010

        yes i’ve enabled the ecommerce tracking in the backend. But still no success!

    • DrewBy Drew on 21 July, 2010

      Was there any resolution to this? I’m having the same problem and when I do test transactions, I see that the thank you page is showing the normal tracking code, not the transaction code. It would be super cool to get this piece working.

  48. Heidi WykaBy Heidi Wyka on 12 July, 2010

    Hello. I’m new to the blogging world. I am trying, desperately, to get Google Analytics up and running, but I’m having trouble. I set up an email account with gmail. It’s Each time I click the button for authentication, I keep getting an error and I don’t understand what to do. I have my blog website set up through wordpress. What do I need to do or what am I doing wrong. Can you help me please?

  49. VoyleBy Voyle on 13 July, 2010

    Yoost, just want you to know something. I have subscribed and unsubscribed to close to 100
    “lists” and of them all, yours has been the best. Never had any desire to unsubscribe. You
    are delivering value. Though you’re waaay over my head, I do understand some of it and
    I use it. Better, I read every comment — never have done that before. I’m impressed with
    your support. I’ll be a subscriber for a long time. (Of course, at 68, that might not be a real ‘
    long time…but hey, I’m with you to the end. :)

    • Joost de ValkBy Joost de Valk on 13 July, 2010

      Thx for those kind words Voyle, appreciated :) (68, though? My dad isn’t even 68 yet, but then again, he wouldn’t know how to deal with all the information on this blog, or how to install a plugin ;) )

  50. colinBy colin on 13 July, 2010

    thank you for your great plugin. love that I can quickly see the stats that matter to me.

    Hartelijk dank Joost!

  51. aljukBy aljuk on 13 July, 2010

    That’s great work.

  52. Phil v. SassenBy Phil v. Sassen on 13 July, 2010

    The plugin worked like a charm.

    Unfortunately since the recent update Goggle doesn’t track anything. BTW: I am using Version

    Best regards from Berlin – Germany, Phil

    • Joost de ValkBy Joost de Valk on 13 July, 2010

      Hi Phil,

      as far as I can tell, tracking is working fine, the right stuff is going to Google without any warnings.

      • Phil v. SassenBy Phil v. Sassen on 13 July, 2010

        Thank you for your speedy reply.

        In this case google seems to be in hiccup mode. Yesterday it reported only one visitor where the Automatic stats registered way more than this. BTW: Even my Alexa Rank improved …

        Hope its a temporary issue.

        Regards, Phil

        • Joost de ValkBy Joost de Valk on 13 July, 2010

          Just thought of this just now, but what could have happened is that your pages were cached… I see you’re running W3 Total Cache and the plugin doesn’t automatically clear the cache once you’ve updated the settings, even though it probably should…

          • Phil v. SassenBy Phil v. Sassen on 13 July, 2010

            Joost, your support is great! I emptied the cash.

            As soon as I have a clue I am going to update you.

            Thanks once again,


          • Phil v. SassenBy Phil v. Sassen on 14 July, 2010

            analytics is back again. It was a temporary issue!

  53. akanxBy akanx on 14 July, 2010

    previously I was using version 4.0.2 now I’ve updated it to version 4.0.4, thank you earlier
    because after using this plugin very aesthetically difference in my stats.

  54. BlairBy Blair on 14 July, 2010

    Hi Joost,

    You’ll probably laugh because the answer might be ‘because you didn’t have any visitors’, but I’ve recently added your analytics plugin to my blog, and now my stats are showing 0 visitors (Before installing the plugin I had a steady trickle).

    The reason I think this might be wrong is I had 3 separate people retweet one of my posts yesterday, so for the analytics to say 0 visitors is a bit strange?

    I’ve clicked on ‘check status’ inside google analytics itself, and it says ‘receiving data’ with a tick symbol. Is it possible that I’ve made some incorrect selections inside the admin section?

    Really grateful for any advice you could offer.


  55. FarenBy Faren on 14 July, 2010

    Mine is saying the same thing. Hope its just a small fix!

  56. Doug SmithBy Doug Smith on 14 July, 2010

    Thanks for your hard work on a great update!

    One thing I have noticed is that I’m seeing a large increase in 404 errors in my logs where the URL is mangled with part of an analytics URL tacked on to the end, like this:


    I spot-checked the IP addresses of some of them and they all seem to be from Hughes Network Systems. So I don’t know if it’s something in the plugin or just Hughes’ proxy server mangling the URLs, which I’ve seen happen before. I thought I’d mention it just in case.

  57. MOCHIMADdotCOMBy MOCHIMADdotCOM on 14 July, 2010

    The instant I updated, all nine of the sites I track forced me to reauthenticate. I ended up entering my UA manually, which let me skip the reauthentication. AND the actual Google Analytics settings landing page can no longer see my list of sites. There is a red-boxed error warning in the masthead that says ‘This page has encountered an error that may prevent it from working correctly.’ I was able to view my sites in the dropdown, but the settings page sees nothing and loads nothing. It started the minute I updated the first site to the latest plug-in. I hope I don’t lose months and months of stats or lose current stats.

  58. Krims@nline.comBy on 14 July, 2010

    Since the installation of the new GA plugin GA is not tracking my comments anymore. The _trackPageview is not showing up in my top content. Any one an idea ?

    function trackFormSubmit(pageview) {
    try {
    setTimeout(‘return true;’, 100);

    For the rest I’m using GA plugin for a long time now and it does what it needs to to in an easy way. Thanks for this super plugin.

  59. JohnBy John on 16 July, 2010

    The updated version is working great for me but none of the custom variables I’ve selected are showing. I believe I should see it in visitor > custom variables

    Is anyone else not seeing them? or am I looking in the wrong place?


  60. iBenRoweBy iBenRowe on 18 July, 2010

    Great work! Locked and loaded! Thanks! :D

  61. Ant StoneBy Ant Stone on 19 July, 2010

    Great plugin Yoast, but I’m having trouble with something.

    In the “Google Analytics for WordPress Configuration” dashboard I select the account I’d like, and one of the two associated profiles.

    I click, tick and mould the settings then click: ‘Update Google Analytics Settings’. But the profile I selected defaults back to the one I don’t want.

    The extra profile is actually a result of following another one of your tutorials ( This is the one I do not want to track with your new plugin, I just want to track the default Google Analytics account for this particular account.

    Thanks for taking the time to produce this plugin, perhaps you can help — am I missing something?

    • Joost de ValkBy Joost de Valk on 19 July, 2010

      If I get it correctly they’re for the same site? In that case this is the result of the fact that both profiles share the same UA code, and the one comes first in the list of profiles. So, it’ll track just fine, I just need to add an explanation of some sort to reflect that…

      • Ant StoneBy Ant Stone on 19 July, 2010

        Thanks Yoast. Yes, both for the same site.

        For example, the two profiles I have created for this site are:

        SEO Rankings (your tutorial) (main Google setup)

        The figures shown aren’t exactly the same for some reason, so I’m editing the SEO Rankings to “X SEO Rankings” to default to the one.

        Thanks for taking the time to respond.

  62. RandBy Rand on 20 July, 2010

    Hi Yoast,

    Thanks so much for the plug-in!

    I having some trouble, though, after having moved my domain to a new server, I receive a blank screen when choosing the GA settings, with a reference in my error log to:

    PHP Fatal error: Cannot use string offset as an array in foo/google-analytics-for-wordpress/googleanalytics.php on line 284, referer:

    4.0.4 was working fine on the other server.

    I’ve deactivated and removed 4.0.4, and reuploaded and reactivated 4.0.4, with the same result.

    Any ideas?

    • RandBy Rand on 20 July, 2010

      Oh, sorry, I should have mentioned, I’m using WP3.

  63. Travis ClarkBy Travis Clark on 20 July, 2010

    Great work Yoast, as usual. I seem to be having the same issue with this site not tracking
    since I updated. (I am using 4.0.5).

    I have one other site under the same account (the primary) and it’s tracking properly. Using
    WP3. Any advice would be great appreciated.

  64. Dan GreeneBy Dan Greene on 20 July, 2010

    Does the plug in support multiple tracking codes?

  65. Udegbunam ChukwudiBy Udegbunam Chukwudi on 21 July, 2010

    The plug-in still works fine for me. Just wanted to remind if there was a way of fixing the setdomain name issue that keeps putting a dot before www ie _gaq.push(['_setDomainName',''],['_trackPageview']);


    • Joost de ValkBy Joost de Valk on 21 July, 2010

      Hmm jotting that one down, would have to look into it.

  66. CharlesBy Charles on 23 July, 2010

    I see this plugin is now at v4.0.6 so I’m guessing most / all the issues mentioned by people in the comments have been fixed?

  67. ChristinaBy Christina on 25 July, 2010

    If it’s fixed already…then it’s really a must have…I’ll try it myself…thanks.

  68. StephanieBy Stephanie on 30 July, 2010

    OK- so I loaded google analytics on the blog- but does it take a bit to start tracking? I get the big ! warning on my google analytics page.

  69. Mark JansenBy Mark Jansen on 31 July, 2010

    Thanks for writing this great plug-in!

    One suggestion: could you implement a feature which automatically segments users if a certain parameter has been specified in the URL? Eg. if the visitor visits I want to be able to segment using this variable “newsletter”. Is this possible?

    • Joost de ValkBy Joost de Valk on 8 August, 2010

      Hey Mark, that’s actually what the Google Analytics campaign tagging was invented for… Read the docs, and try out the tool that google provides to help tag links.

  70. bradBy brad on 31 July, 2010

    Hey there, I was wondering if this plugin could some how be used to track user traffic on an author by author basis. Im trying to pay them on a performance basis but there dont seem to be any decent plugins out there for that and at the moment, I just literally count the views per post over a period. Would be nice if I could see it per author.

    • Joost de ValkBy Joost de Valk on 8 August, 2010

      You can by using the advanced segments and specifying author as one of the advanced segments to track. A tutorial on how to do this is in my planning actually :)

  71. ZacchaeusBy Zacchaeus on 31 July, 2010

    Should I use this in addition to my Google Analytics client in my Google account? Do they override eachother?

  72. KenBy Ken on 3 August, 2010

    Great plug in. I am running 4.0.6. Everything seemed to install easily enough. The settings are very east to use. But the first day running the plug-in just closed and Google did not pick up any traffic. To be fair, I also just migrated the site from Joomla to WordPress, changing hosts at the same time. But their do not appear to be any issues with accessing the site externally. We got a normal number of comments today so I know there was traffic. I am not even sure where to start. Any ideas?


    • Joost de ValkBy Joost de Valk on 8 August, 2010

      There’s a 24 hour delay in Google picking up traffic, especially right after when you install a new tracking code, if the problem has persisted, please contact me through this site.

  73. KenBy Ken on 4 August, 2010

    Let me know if you have any thoughts on what the problem might be. I didn’t get any stats again today so I dug a little deeper. I entered the UA code manually and also inserted the tracking code manually in header.php before the tag. That seems to have fixed it. I can now see the code when I view code from my browser. The outbound links were getting tagged before but not the main tracking code.