Update (2012/11/17): the original “Google Analytics Plugin” has been renamed to “GA Google Analytics” to find a home in the WordPress Plugin Directory.</update>
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 asynchronous tracking code to all pages on your WordPress-powered site.
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.
Screenshots
![[ Google Analytics Plugin ]](http://perishablepress.com/wp/wp-content/images/2012/google-analytics-plugin-01.gif)
![[ Google Analytics Plugin ]](http://perishablepress.com/wp/wp-content/images/2012/google-analytics-plugin-02.gif)
Download Google Analytics
Download GA Google Analytics from the WP Plugin Directory:
WP Plugin: GA Google Analytics
Learn more about GA
More info on Google Analytics
18 Responses
Jon Bukiewicz – April 10, 2012 •
This looks great, Jeff. Thanks for putting it together!
Jeff Starr – April 10, 2012 •
My pleasure! I hope it’s useful :)
Robbie – April 10, 2012 •
Hey Jeff, thanks for this. Do I need to do anything to ensure logged in users/admin are not tracked?
Jeff Starr – April 12, 2012 •
Nope, the tracking code is added via your theme’s
wp_headtag, which isn’t included in the WP Admin area. So it’s included on the front-end only :)Andy – May 4, 2012
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.
Nima – April 10, 2012 •
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!
Jeff Starr – April 12, 2012 •
Exactly. Thanks for the feedback :)
Micah – April 10, 2012 •
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:https://github.com/h5bp/html5-boilerplate/issues/65#issuecomment-360743
Jeff Starr – April 12, 2012 •
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.Dan Blumenthal – April 11, 2012 •
Great. Does this also show the analytics within the dashboard?
Jeff Starr – April 12, 2012 •
Nope, but Google Analytics Dashboard comes highly recommended.
Grace – October 31, 2012 •
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 – October 31, 2012 •
Correct, you’ll need to log into your Google account to view the statistics, or you can install the Dashboard plugin (or similar).
Grace – October 31, 2012 •
Great – have figured it out now :) thanks for the quick reply
Caitlin @ Chasing Cait – November 5, 2012 •
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?
Jeff Starr – November 6, 2012 •
Should be within 24 hours (or sooner), see this thread: http://bit.ly/TtrsPH
jay – November 13, 2012 •
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?
Jeff Starr – November 13, 2012 •
Not sure, but if you send login infos I’ll be glad to jump in and take a look. To do so, send via my private contact form at http://perishablepress.com/contact/