WordPress analytics provide a wonderful way for you to analyze the traffic and user behavior your WordPress website receives. It’s an important tool for business as the data it outputs can help you strategize the way you handle landing pages, content, sales pages and more.

There are a number of different analytics tools you can use and a number of different ways you can implement Google Analytics in WordPress. We’re going to focus on Google Analytics in this post. It’s one of the most popular analytics tools available as well as one of the most powerful. We’ll go over what Google Analytics is, how you can use it to implement WordPress analytics on your site, plugins you can use, issues you may face and even alternatives to the service. Let’s get started.

What are WordPress Analytics?

[image: google-analytics-dashboard-for-wp.png]

When you launch a website and start blogging and doing other things to attract visitors, you need a way to analyze all of the traffic you receive. We call this “WordPress analytics” in WordPress. You insert a tracking code from an analytics tool on your website, and the tool outputs data from your users.

Among telling you how much traffic your site receives in real time or on a given day, month or year, these analytics can help you discover the following:

What types of content receive the most amount of traffic on your site.

This can help you develop a stronger content marketing plan and help you fill your editorial calendar with topics you know your readers love.

The region the majority of your users come from.

This can help you ensure you’re optimizing your site, products and services for the types of people and languages your site is popular with.

Your site’s ability to convert.

Knowing what your customers do when they reach your site is a great way to determine how well it’s able to convert. Analytics are able to track the behavior of new and returning users so you can see if they visit other pages on your website (great engagement) or if they always leave on the first page (high bounce rate).

Where your traffic comes from.

Blogging, posting on social media, advertising and other forms of marketing are important. However, analytics tools are able to simplify all of this by determining which sources provide the most amount of traffic for you. This can help you be more efficient by letting you know which sources of traffic to focus your time and effort on.

Which pages aren’t performing well.

The pages users are on when they leave your site may tell you which pages you need to optimize. These are known as “exit pages,” and most analytics tools will help you identify them.

That’s just the tip of the iceberg. Analytics tools are multi-feature applications that reveal a monstrosity of data about your site that can help you make smarter business decisions. It’s an essential tool every entrepreneur needs to add to their workflow, and Google Analytics provides one of the easiest ways to get that done.

What is Google Analytics?

[image: google-analytics-logo.png]

Google Analytics is one of the most popular analytics tools available in the world of online marketing. It’s developed by Google, as its name suggests, and it was launched in November of 2005. The tool is, for the most part, available to use free of charge aside from an enterprise version and a niche version dedicated to targeting mobile users.

Google Analytics’ main purpose is to help you analyze the traffic your site receives. Similar to what we talked about before, it can help you figure out things like where your traffic comes from and which topics on your site are collecting the most amount of views. Here’s the main dashboard for reference:

[image: google-analytics-dashboard.png]

The service also integrates with Google AdWords, Google’s advertising service, and several ecommerce solutions. This can help you extend your analytics by including data from landing pages and conversions.

Getting started with Google Analytics is simple. It begins with creating a Google Analytics account by visiting the Google Analytics homepage. You’ll need a Google account to do this. Using your personal Google account is perfectly fine, but you can also create a business-centric account with Gmail or G Suite. Just be certain it’s an account you own and not your contractor’s as you’ll have a high likelihood of losing access to it if the two of you ever part ways.

It’s just a matter of creating a property after that. This creates an analytics account for your site. You can do this by navigating to Admin and hovering over your name to click Create New Account.

WordPress Analytics: How to Add Google Analytics to WordPress

The bulk of this article will focus on how to get your Google Analytics tracking code in WordPress. We’ll be focusing on these methods:

  • Using a dedicated WordPress plugin.
  • Using a code snippet plugin.
  • Manually adding the code to WordPress.

First, you need to know where to find the tracking code. There are two pieces of information you can use to start tracking your WordPress site:

  1. The tracking code itself, which is a snippet of JavaScript.
  2. Your Tracking ID, a much smaller but equally identifiable element.

The one you use is dependent on the method you use to add the code to your site. Each method uses a different approach, so it’s best to learn where to find each of these pieces of information. Thankfully, finding them is simple. Here are the steps:

  • Go to Admin.
  • Find the column designated for your property.
  • Select Tracking Info.
  • Select Tracking Code.

The screen that takes you to should have your Tracking ID and a script of code that comprises your tracking code (under Website Tracking).

Let’s get into our methods.

Method #1: Using a Dedicated WordPress Analytics Plugin

This method involves using a dedicated Google Analytics WordPress plugin that has a feature designed to help you link your WordPress site to the property you’ve set up for it. We’ll be going over four plugins that offer this feature:

  • Analytics Cat
  • GA Google Analytics
  • Google Analytics Dashboard for WordPress
  • MonsterInsights

Let’s start with Analytics Cat.

Analytics Cat

Analytics Cat is a free Google Analytics plugin by Fatcat Apps. It’s a simple plugin that has two basic functions. One provides an easy way for you to add your tracking code to your WordPress site. The other allows you to hide the tracking code from users who are logged in so your administrators, editors and other members of your team do not appear in your data.

After you install Analytics Cat, a message will appear in the WordPress admin asking you to “Set Up Google Analytics.” Clicking this leads to a page that allows you to connect your Google Analytics account to your website. When you click this button, you’ll be taken to a page you can insert your Google Analytics tracking ID on.

[image: analytics-cat.png]

That’s all there is to it when you use this method.

Download

GA Google Analytics

GA Google Analytics is another plugin that makes it simple to add your tracking code to your WordPress site. It’s similar to Analytics Cat in that its main feature is to provide a way for you to add this tracking code to your header or footer (your choice). There’s no need to go into your site’s files and add it manually.

[image: ga-google-analytics.png]

There are other features, such as the ability to add custom code and enable things like universal analytics and link attribution. However, most of these are advanced features that should only be used by experienced users and developers. The plugin’s also available free of charge.

Download

Google Analytics Dashboard for WordPress

Google Analytics Dashboard for WordPress is a powerful plugin that comes loaded with a suite of features. Its main purpose is to allow you to view key Google Analytics data on the dashboard of your WordPress site. This includes the amount of traffic your site receives, organic searches, page views, bounce rates and more. If you’re an experienced developer, you can even use options and hooks to add events tracking in WordPress. You can do this with downloads, emails, outbound links, inbound links, page scrolling depth and more.

One specific feature this plugin offers is the ability to integrate your tracking code into your website. It’s very simple to do. Start by installing and activating the plugin, and head straight to the General Settings page. There will be an Authorize This Plugin button there. All you need to do is click this button, and link your Google account to the plugin. It’ll find and integrate your tracking code for you.

[image: google-analytics-dashboard-for-wp-tracking-code.png]

That’s it. Google Analytics will now begin tracking your site.

Download

MonsterInsights

MonsterInsights is another dashboard plugin that allows you to implement Google Analytics tracking code on your site and view the stats on your dashboard. You can even enable universal tracking and see which pages on your site are most popular. Information about your users, such as the devices they use and where they live, is also available. You can even enable tracking for your WooCommerce or Easy Digital Downloads store.

As for implementing your tracking code, all you need to do is go to the Settings page and authenticate the plugin with your Google account.

[image: monsterinsights.png]

If you want advanced features, such as ecommerce tracking, ads tracking and custom dimensions, you’re going to need to pay for the premium version. Pricing starts at $39/year.

Download | Premium

Method #2: Using a Code Snippet Plugin for WordPress Analytics

These next two methods involve using the actual tracking script you were provided, not your tracking ID. The code snippet plugin is definitely a much more efficient approach to adding WordPress analytics tracking code to your site or any code for that matter. All you need to do is install one, and paste your code into the header or footer text editor. Most site owners prefer adding the tracking code to their headers, but either one will work.

For this method, we’ll be focusing on the following plugins:

First, copy and paste the script for your Google Analytics tracking code:

[image: google-analytics-tracking-code.png]

Next, install one of the plugins listed above, and insert the script in either the header or footer text editor. Here’s a screenshot for each plugin.

For Head, Footer and Post Injections, go to Settings → Header and Footer, and paste the code in one of the boxes. I recommend using the On Every Page box.

[image: head-footer-post-injections.png]

For Insert Headers and Footers, go to Settings → Insert Headers and Footers. Paste the code in one of the text editors:

[image: insert-headers-and-footers.png]

For Head & Footer Code, go to Tools → Head & Footer Code. Add the code to either text editor:

[image: head-footer-code.png]

That’s all for this method. Let’s talk about how to do the same thing but manually.

Method #3: Adding Google Analytics Tracking Code Manually

The third method involves adding the tracking code script directly to your theme’s header.php file. You’ll need a child theme for this. If you were to add the code to your main theme’s header file, it would be deleted in the next update, and you’d have to insert the code again. A child theme fixes this issue as it inherits the style and functionality of its parent theme while allowing you to add code to your site that won’t be deleted in the next update.

Once you’ve created a child theme for your theme, you can create a header.php file in your child theme’s directory. Copy (don’t cut) the code from your parent theme’s header.php file, and paste it into your child theme’s header.php file. Then, go to Appearance → Editor, open your header.php file, and paste the tracking code at the bottom of the file.

[image: google-analytics-tracking-code-header-file.png]

This method generally isn’t recommended as the code will be deleted in the next theme update if you don’t create a child theme properly. You’ll also lose it if you decide to change your theme.

Additional Google Analytics Plugins

There are two additional plugins we’re going to go over:

  • Analytify
  • Enhanced Ecommerce Google Analytics

Let’s start with Analytify.

Analytify

Analytify is a powerful plugin. It allows you to add Google Analytics tracking code to your website and track it inside of WordPress. You can review a long list of data, from the top countries and cities your users are from to the top sources of traffic your site receives. You can also view data from social media, bounce rates and more.

There’s also a premium version of this plugin that includes even more data. This means data outputted in real time and data from campaigns. The premium version even comes with shortcodes and CSS you can customize. The base plugin is free, and pricing for the premium version is available in add-ons you can purchase one by one or in bundles. Pricing for these starts at $39/year.

Download | Premium

Enhanced Ecommerce Google Analytics

Enhanced Ecommerce is a feature the developers added to Google Analytics. It allows store owners to track things like product impressions, product clicks, which product details a customer views and more. The Enhanced Ecommerce Google Analytics plugin allows you to use this feature with WooCommerce.

The data is outputted in four reports for shopping behavior, checkout behavior, product performance and sales performance. It’s a unique feature you can implement in your store to include more stats in your WordPress analytics and business decisions.

Download

A Tip for Users in Certain Regions

Any website that uses analytics tools to track visitors and collect data should have a privacy policy. That includes WordPress sites that have implemented WordPress analytics. You should insert this policy on a page of your website, and place a link to it in the footer. You can use a service like LegalZoom to develop one.

If you live in certain regions, you may be required to go one step further and “anonymize” your visitors’ IP addresses. If this is the case, you’ll need to add one of these code snippets to your tracking code:

For all events:

gtag(‘config’, ‘<GA_TRACKING_ID>’, { ‘anonymize_ip’: true });

For a single event:

gtag(‘event’, ‘your_event’, { ‘anonymize_ip’: true });

You’ll need to edit the “GA_TRACKING_ID” and “your_event” bits to suit your own needs.

WordPress Analytics: Common Issues (and Solutions) with Google Analytics

There are a number of different issues that can occur when you use Google Analytics to implement WordPress analytics on your site. Some have to do with getting WordPress to work on your site while others are specific to Google Analytics. We’re going to focus on these three issues in this article:

  • Data not collecting.
  • Data only collecting on certain pages.
  • Your bounce rate is too low.

Let’s start at the top.

Data Not Collecting

There are three ways to determine if Google Analytics is connected to your site correctly.

  1. Look at your notifications in Google Analytics. If you get one that says “Missing Tracking Code,” you likely aren’t receiving data.
  2. If you used a dedicated plugin to add the tracking code, look at the plugin’s settings to see if there’s an error.
  3. Send test traffic to your site by navigating to Admin → Tracking Info → Tracking Code → Send Test Traffic. If there’s an active user, all is well.

There are a few different things you can do if your tracking code is not working correctly. You can double check that you entered the code correctly and did not try to use the tracking ID in place of the tracking script or vice versa.

You can also see if a plugin is interfering with the code by deactivating every plugin except for the one you used to add the code to your website. Activate one plugin, and send test traffic to your site. If there is no active user, repeat the steps with the next plugin. If there is an active user, the last plugin you activated is likely causing an issue. Contact the developer or find another plugin to use in place of that one if they can’t help.

Data Not Collecting on Some Pages

Sometimes a user error occurs that causes data to collect on some pages but not on others. This can happen if you inserted the code in a place that only targets certain parts of your website. This includes a plugin that allows you to insert header and footer code on specific pages versus every page.

Use an application like Screaming Frog to see if your site is properly tagged.

Low Bounce Rate

A “bounce” is counted whenever a user visits one page on your website without visiting another. It doesn’t matter if they spent five minutes on the page or one second. If they do not navigate to any other part of the website, it’s counted as a bounce.

You should always optimize your website for conversions and engagement and aim for a low bounce rate, but if your bounce rate is too low, say under 50%, there may be a problem. Make sure your tracking code isn’t listed twice in your files. The double code may count as a second pageview, which could result in a lower bounce rate.

Final Thoughts

WordPress analytics are a key component in every marketing strategy you implement for a WordPress site. We focused on Google Analytics in this post, but here’s a list of other analytics tools that work with WordPress if you’re interested:

This article also focused on how to add WordPress analytics to your site with Google Analytics. We only briefly touched base on how to use it. So, we’d like to pass the topic off to you. What types of data do you collect? Let us know in the comments below.

ClickWhale - WordPress Link Manager