How to track Visitor Statistics in WordPress

How to track Visitor Statistics in WordPress via @GretLouiseGoogle 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.

(Google Analytics is not available in WordPress.com because WordPress.com does not allow the insertion of any Javascript code. But other non-Javascript based methods like StatCounter can be placed in WordPress.com widgets.)

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?

If you use more than one method for tracking your statistics, be aware that they will probably never agree. Google Analytics uses Javascript code for tracking, and not all browsers allow Javascript. Likely the stats from your host will be highest (they know how many times your pages are being visited, but they also tend to lump image requests in with page requests), but Google Analytics is usually the preferred standard. Plugins allow you to prevent Google Analytics from tracking your own visits, giving a more realistic picture of your traffic. WordPress.com stats also do not track logged in visits.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

8 Comments

  1. So what can I do if I moved my site from wordpress.com and it was connected to analytics there…Should I copy the same to my .org site?

  2. Is there any plugin on what keyword users or coming to my blog ? Because I have different topics on my blog. I want to know which topic is interesting for readers.

  3. Useful information thank you.

    Does anyone know of a way I could see the stats for all the sites I have, but in one place?
    This would save having to login to each site for the details.

  4. Can I get google analytics to track my site?
    failingathaiku.wordpress.com

    I would love to use google to track my stats but I am not sure if they will do it if I am not a .com blog.
    I wish someone besides WordPress could do it because we all know their stats are off!

    1. Hi Symanntha! Unfortunately, you can’t use Google Analytics with a WordPress.com blog (see parenthetical note at the end of point #3). However, you do have plenty of non-Javascript based tracking methods (see options listed under point #5). Hope one of those will give you something to compare with WP’s stats.