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.
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):
Download
You can get more information and download GA Google Analytics from the WordPress.org Plugin Directory:
18 responses to “WordPress Plugin: GA Google Analytics”
This looks great, Jeff. Thanks for putting it together!
My pleasure! I hope it’s useful :)
Hey Jeff, thanks for this. Do I need to do anything to ensure logged in users/admin are not tracked?
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.
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!
Exactly. Thanks for the feedback :)
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.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.Great. Does this also show the analytics within the dashboard?
Nope, but Google Analytics Dashboard (404 link removed 2017/02/01) comes highly recommended.
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…?
Correct, you’ll need to log into your Google account to view the statistics, or you can install the Dashboard plugin (or similar).
Great – have figured it out now :) thanks for the quick reply
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?
Should be within 24 hours (or sooner), see this thread: http://bit.ly/TtrsPH
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?
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 https://perishablepress.com/contact/