New Bookstore! Save 20% on books with discount code: LAUNCH
Web Dev + WordPress + Security

WordPress Plugin: GA Google Analytics

[ WordPress Plugin: GA Google Analytics ] I’ve joked that there a million different Google Analytics WordPress plugins available, but I’ve never been able to find one that’s just dead-simple, plug-n-play, and with clean code and markup, so I wrote my own that does just that: a no-frills way to add the new Google Analytics asynchronous tracking code to all pages on your WordPress-powered site. This analytics plugin is lightweight, fast, and now has over 50,000 80,000 active users via WordPress.org.

New Pro version of GA Google Analytics now available! Check out GA Pro »

Instructions

Install the plugin as usual. Then visit the “Google Analytics” options page to enter your GA ID and done. The Google Analytics plugin works silently behind the scenes to add the required GA code to asynchronously track your site’s activity. Plus the plugin includes a bunch of great options for advanced configuration and optimization.

Screenshot

Here is a screenshot of the plugin settings page (click image for full-size view):

[ Google Analytics Plugin Settings ]

Download

You can get more information and download GA Google Analytics from the WordPress.org Plugin Directory:

Jeff Starr
About the Author
Jeff Starr = Web Developer. Security Specialist. WordPress Buff.
GA Pro: Add Google Analytics to WordPress like a pro.

18 responses to “WordPress Plugin: GA Google Analytics”

  1. Jon Bukiewicz 2012/04/10 10:25 am

    This looks great, Jeff. Thanks for putting it together!

  2. Jeff Starr

    My pleasure! I hope it’s useful :)

  3. Hey Jeff, thanks for this. Do I need to do anything to ensure logged in users/admin are not tracked?

    • Jeff Starr
      Jeff Starr 2012/04/12 5:27 pm

      Nope, the tracking code is added via your theme’s wp_head tag, which isn’t included in the WP Admin area. So it’s included on the front-end only :)

      • I think he’s asking if logged-in users are tracked on the front end… Some less “dead simple” analytics plugins allow you to prevent this.

        Nice work on the minimalist GA plug, anyway.

  4. Perfect. Sometimes all you need is just a simple solution without all the unnecessary bells and whistles. Will be adding to all my sites. Thanks!

  5. This was a great idea. Do you think you could add an option for positioning the code just before the end of the </body> code? There was discussion on the H5Bp project about positioning and I agree with Paul’s comments.

    • Jeff Starr
      Jeff Starr 2012/04/12 5:29 pm

      I’ve been thinking the same thing, so yes, in the next update I’ll include the option to display the GA code before the closing </body> tag. Good call.

  6. Great. Does this also show the analytics within the dashboard?

    • Jeff Starr
      Jeff Starr 2012/04/12 5:34 pm

      Nope, but Google Analytics Dashboard (404 link removed 2017/02/01) comes highly recommended.

  7. Probably a very basic question, but I’m new to both WP and Google Analytics, so – once I’ve installed the plugin, how do I actually see/access the stats? Do I need to also install the Google Analytics Dashboard (or similar), or can I check it somewhere else online…?

    • Jeff Starr
      Jeff Starr 2012/10/31 4:32 pm

      Correct, you’ll need to log into your Google account to view the statistics, or you can install the Dashboard plugin (or similar).

  8. Great – have figured it out now :) thanks for the quick reply

  9. Caitlin @ Chasing Cait 2012/11/05 11:40 pm

    Thanks Jeff, not only for making something simple, but also continuing to answer questions! After installing the plugin, typically how long till results start to show? Is it immediate?

  10. I installed the plugin, activated it, entered the GA ID, ticked enable Google Adsense but Google says it can’t detect the tracking code on my website’s home page. When i checked my page source, the tracking code is there, right before . What am i doing wrong?

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
USP Pro: Unlimited front-end forms for user-submitted posts and more.
Thoughts
Take a screenshot with Firefox (no extension required). Open Developer Tools Settings and enable the “Take a screenshot” button. Then click the button :)
Take a screenshot with Chrome (no extension required). Open DevTools, type Cmd + Shift + P, then type screenshot.
After 10 years working on my 2010 iMac, my upgrade finally arrived. Shiny new iMac shipped from Ireland :)
Too much caffeine weirds me out. But I love the taste of coffee. So once in a while I enjoy a small cup of decaf. Hits the spot.
Chris Coyier is a truly awesome person. One of the finest people I've ever worked with. Just #gottasayit
Excel won't open CSV file because SYLK format? Open it with text editor and add an apostrophe ' at the beginning of the file, save changes, done.
Displaying too many social media buttons and links all over the place imho makes you look desperate and frankly kinda sad.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.