Codeable info

Using Statistics with WordPress

Posted on by in WordPress Tutorials

Do you want to know which of your posts is the most popular? Would you like some insight on what your WordPress website’s visitors like to see? Want to know where you can improve? Sounds like you need to collect some statistics about your website and its visitors.

Statistics, by definition, is the mathematics of the collection, organization, and interpretation of numerical data. Some organizers of data prefer to just give you the raw data collected, which can be a powerful tool for an advanced webmaster. For most, some analysis is needed, where important information can be discovered within the data.

The Usefulness of Statistics

Collecting some statistics will allow you to discover trends about your site’s content, enabling you to find out what type of post fares better when presented to your visitors. The ability to see which posts visitors are attracted to on your website allows you to learn what your users are coming for, and what they do once there.

Conversions, landing pages, and bounce rate are all important things to keep up with on your website. Conversions is the number or percent of visitors that reach a certain goal page once they enter your website. Think of an e-commerce site, where the goal is to get visitors to reach the checkout page. This goal page can be anything from a “Contact Us” page, to a member registration page, or any page that you would like your visitors to see and engage. Knowing how many people reach that goal can tell you if your website is laid out in a proper way to entice your visitors to visit that page. Landing pages is the page that visitors first visit when they enter your website. They may have been taken there by typing your site’s URL into their browser or by clicking a link from another site.

Tracking landing pages will tell you what content is the most popular or most sought-after. People will search for and people will share with their friends the content that most interests them, so finding out what that content is important. Finally, the bounce rate is the percent of visitors that leave your website after viewing only one page. A high rate says that your website might not be set up in a proper way to allow visitors to find relevant content, or even makes it hard to navigate to other content, which often frustrates visitors.

Knowing factors about what your visitors are doing when on your site is very important to know, but knowing how they reached your website is data that is good to know. The referrer, or site that sent a visitor to your website, lets you know if visitors are searching for your website, are following a link shared by friends, or even if your one of your pages or posts has become a hit on some other website.

In most cases, installing some method of tracking your website’s visitors will be beneficial to you and your visitors. You know what they want, which leads you to make content suited to them, which can drive up viewership, and makes people more likely to visit your website again.

Install Tracking on your Website

The act of installing the necessary code used for tracking visitors is usually simple through the use of plugins. Below, we will cover two different services to track visitors, Jetpack Stats from and Google Analytics from Google. Both services can and should be used at the same time, since they display different sets of data in different ways.

Jetpack Stats

This first service comes courtesy of Jetpack by, a plugin created by the same people that make WordPress and run The plugin offers many features, but we’re interested in the stats module that comes with it. It’s also easy for remote management services to hook into Jetpack’s stats, so you can see the analyzed statistics of multiple sites in one location.

To get Jetpack up and running, you need to install the plugin first. After you install and activate it, a message will appear prompting you to connect it to your account. If you don’t have a account, you are prompted to create a free account that the plugin can use to communicate with’s servers. It has to do this in order to remove the load from your server, and allows Jetpack to use’s API for interpreting the collected statistics.

Once the plugin is set up, the settings are not that complicated. In the Jetpack panel within the sidebar, you will see the list of modules that comes with Jetpack. Clicking on “Configure” in the stats module will present you with the available options. The chart in the admin bar will give you a glimpse at how many visitors your site has had within the past 48 hours. Counting registered users is good if you allow people to register with your site, but not good if the only people that can log in are people that post content. The smiley can be removed with no consequence, but can help if stats collection is not working. The final setting of which user levels can view statistic reports is more a matter of preference based on how your site and organization is structured.

Google Analytics

The system provided by Google has many more features than Jetpack. It does not come with a plugin, but gives you a code to place within your site’s source code. Fortunately, there are plugins that will place that code there for you. The one used here is called “Google Analytics for WordPress” and is available in the Plugin Directory.

The first step to using Google Analytics is to create an account within the system. Navigate to the service’s front page and click on “Sign in” if you already have a Google account, or “Create account” if you do not. Once you are signed in, click on “Admin” on the right of the orange bar near the top of the page. Once the page loads, click on “New account” under the Accounts tab, and enter your website’s information. On the next page, you will be asked to enter some information about how the tracking code will be used. Once that is done, you will be presented with some code that looks similar to this:

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-Y']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

Normally you would have to place that code on your website by editing a file, but the plugin mentioned earlier will do that for us. In the settings page for Google Analytics for WordPress, you have the option to manually enter your UA code, which is the XXXXX-Y in the provided tracking code, just after _gaq.push([‘_setAccount’, ‘UA-. The other settings can be left as their defaults, and once you save that information, data collection should begin.

Monitoring Your Website using Statistics

After a few days of collecting statistics, both Jetpack Stats and Google Analytics should have a collection large enough to figure out some patterns within the data. Jetpack Stats has an interface which is easier to understand at first while Google Analytics displays more information and requires a more complicated interface.

Jetpack Stats

Jetpack Stat’s dashboard can be accessed by clicking on “View All” on the Site Stats widget on your site’s dashboard, or by going to the Site Stats subpanel within the Jetpack panel within the admin sidebar.


Once the page is finished loading, you should be greeted by a bar graph resembling the one in the image above. The graph will show the amount of views your website has received every day, week, or month, depending on the view specified. The graph makes it easy to see if traffic has changed over time, or if there was a spike or dip in traffic during a specific period. Clicking on “Summary Tables” will give you another indicator as to the fluctuations in site traffic during the past.

The area below the graph will display more information collected about today’s visitors. Each set of data is important in its own way, and you can make judgments based on that data. Clicking on “Summaries” in the top portion of any section will show you the cumulative statistics collected over the past seven days.

Google Analytics

Google Analytics offers much more data about your website’s visitors, and that makes its interface more complicated than the interface of Jetpack Stats. We will only cover features that are different than those discussed with Jetpack Stats. When you first log into Google Analytics, you will be faced with a list of the accounts with statistic collections. Click on the account you created for your website, the property for that site, and then the profile that you wish to see.


By default, the dashboard will show you a line graph of the number of visits per day that your website received during the past month. Below that will be a list of some useful metrics and a pie chart showing the percent of new versus returning visitors. Some of the metrics in the list to look at include the pages per visit and bounce rate. The number of pages that people visit once on your website lets you know if they will travel to another page once done with the one they landed on. The bounce rate, which can have a negative relationship with the number of pages per visit, tells you what percent of visitors left after viewing only one page. Even further down the page is some additional visitor information that may be useful to you in the future, but right now can be considered only some interesting information.

A fairly useful visual tool provided by Google Analytics is the “Visitors Flow” page within the Audience panel. You can find it in the sidebar to the left of the dashboard. The Visitor Flow shows you where your audience is from, what pages are popular landing pages, and even which pages a visitor may see when they decide to continue looking through your site. This is important to look at to see how many people are going to your specified goal pages and how they got there, allowing you to promote the better paths and enhance the paths that do not work as well as the others.


Once you have discovered the useful properties of being able to see some statistics about your visitors and what they do on your website, you should have a better idea of what content they come for and what content makes them stay. Since your site exists for its visitors, you should use this information to improve your website, as well as take a look at the major sources of traffic so you can better capitalize on those visitors and work to improve your keywords and excerpts, since those are what may be displayed when linked on several social networking and link aggregation websites.

Two of the better services available to websites that run WordPress are Jetpack Stats and Google Analytics. Jetpack Stats runs within WordPress and is easy to understand, but Google Analytics can display much more information about your visitor and their actions. Using both services on your site will help you to better understand your visitors and to make improvements that will improve the quality of your website, and hopefully increase the amount of conversions that occur.

Additional Resources

Link: Google Analytics Feature List from Google Analytics
Link: Google Analytics for WordPress from the Plugin Directory
Link: Stats from Support
Link: Jetpack by from the Plugin Directory

Codeable info

Comments (2)

Comment by says:

That is a really good tip especially to those fresh to the blogosphere.
Short but very accurate info… Thank you for sharing this one.
A must read post!

Comment by Heny says:

Hi Chris

Are there any drawbacks to using both? For example, would site performance take a hit (no pun intended)?

Codeable info