Google Analytics is usually considered the standard for site statistic and analytics. However, it’s just one option out of many. Here are five different ways to track your site’s stats—and details on just how easy it is to install Google Analytics in a self-hosted WordPress site.
1. From your host.
Most web hosts have some form of statistics available to you via your cPanel. But logging into your cPanel isn’t something most people do every day, so while it’s nice to know those stats are there, it’s nice to install another method of tracking your site visitors.
2. From WordPress.com.
WordPress.com users have built in stat tracking. When they make the move to WordPress.org, they can take the same stats system with them via the Jetpack plugin. Just install the Jetpack plugin and link it to your existing WordPress.com account. (The Jetpack plugin comes with mixed reviews, however. Click here to find out if the Jetpack plugin is good for your blog.)
Did you know? That tiny graph in your Admin Bar or Toolbar is called your “Sparkline.” Each line of the graph represents an hour, so the entire graph shows your site views over the last 48 hours. The arrow and number that appears when you hover over it indicates the highest number of page views per hour within the last 48 hours. (Read more from the WordPress blog and WordPress support about Sparklines.)
3. From Google Analytics (with a tracking code).
Signing up for Google Analytics is easy: just go to http://analytics.google.com and sign in with your primary Google account. Once there, add your site if it’s not already set up. Once you get to the steps for inserting the tracking code, you have two choices: insert the code into your site’s header or footer via a theme option, or use a plugin (see step 4).
If you are using a professional theme from a source like StudioPress or WooThemes, you probably already have a spot in your theme settings to put your tracking code. In Genesis, choose Genesis, Theme Settings, and paste your code in the Header Scripts area. In WooThemes Canvas, choose Canvas, Theme Settings, General Settings, Quick Start and paste your code in Tracking Code. Make sure that your tracking code is still in place after any theme updates. Changing your theme will likely remove your tracking code, making option 4 more reliable.
If you don’t see a spot for “tracking code” in your theme settings, then it will be easiest to follow option 4 unless you are comfortable with editing your functions.php (not recommended for beginners).
Want to see your stats when you visit your WordPress dashboard, rather than having to visit Google Analytics? Install a plugin like Google Analytics Dashboard.
4. From Google Analytics (with a plugin).
The easiest way to install Google Analytics in WordPress.org is simply to install a plugin like Google Analytics for WordPress, Google Analytics Dashboard for WP, or Google Analyticator. Once you activate the plugin, visit the plugin settings to authorize it to use your Google Analytics account (assuming you’ve already added your site at http://analytics.google.com).
Using the plugin method, the settings usually default so that your own visits to your site won’t be tracked when you are logged in. You can change which user levels are tracked when logged in by visiting the plugin settings, but it’s usually best to leave them default.
Once the plugin is installed, revisit your dashboard to find your Analytics displayed right there whenever you come to your dashboard. (Yoast’s Google Analytics for WordPress requires the installation of a plugin like Google Analytics Dashboard to view the stats in your WordPress dashboard.) To remove the stats from your dashboard or rearrange their placement, revisit the tips in 5 Things You Should Know About Your WordPress Dashboard.)
5. From other services.
If you previously used a service like StatCounter, W3Counter, or SiteMeter before you moved to WordPress, you can simply paste your previous tracking code into a widget or your site footer. Or better yet, search for a WordPress plugin that will do the job for you so that the widget doesn’t accidentally get deleted (there are plugins for StatCounter, W3Counter, and more).
Looking for more than Google Analytics? Quantcast gives lots of demographic details about your visitors in a beautiful report that you can share as a public link or use as a great screenshot in a media kit. There are also paid tracking services like Clicky (recommended by Yoast).
Got more than 5 minutes?
Just don’t go overboard on tracking your stats. Each method you use to track your site’s visits has to be loaded on each visit. Too many statistics options could slow your site load time.
Want to check to make sure the Google Analytics code is appearing on your site? Log out of your WordPress site, right click the page, click View Source, and type Ctrl + F to search for “UA-“. You’ll quickly be able to spot your code if it’s there, because all Google Analytics tracking codes begin with UA-. If you’re having issues, try using a different plugin. (Click here for Google Analytics Support.)
Want to really analyze your WordPress analytics? Check out Yoast’s tips for creating a custom dashboard within Google Analytics that tracks WordPress specific links or WPBeginner’s tips on tracking WordPress links.