How to Add Google Analytics to Your WordPress Website

Google Analytics is one of the most popular tools for tracking website visitors. Not only does it show the number of times any particular webpage on the site has been visited, but it also delivers data regarding social engagement as well as other referrals.

Using the data collected by Google Analytics, you can devise content strategies while monitoring performance across varying devices. And because it’s free, you have nothing to lose and so much to gain.

Today, I’m going to show you one of the best ways to add Google Analytics to WordPress websites. This method does not require any coding aside from a simple copy-and-paste from Google itself.

Why install Google Analytics into your WordPress platform?

Many web hosting providers, such as GreenGeeks offer many built-in web statistics software for your website. While this is great for a basic view of your site’s statistics, you need Google Analytics if you want more in-depth information.

With Google Analytics integration with WordPress, you can quickly assess many other things, including the following:

  • How your demographic is accessing your website
  • When your target market visit your website most frequently
  • Who exactly is visiting your site and if they are in your demographic or not
  • How visitors are actually interacting with the content on your site in real time

Setting Up Google Analytics

First, you will need to have a Google Analytics account. This type of account is completely different from having an account with other Google services such as Gmail or Youtube. However, you will still use the same log in credentials as you do for those other services.

Go to the Google Analytics page and click, “Sign Up For Free.”

Google Analytics Page

Sign up for an account using your credentials. You can use a Google account you already have set up especially if you use tools like the Search Console for submitting your sitemap. You will then need to follow the instructions to add your website to the Analytics tool.

Once you set your website property up in Google Analytics, you will be provided a “UA” number. This is the tracking information that you’ll use on your website. Copy this tracking ID including the “UA.”

Copy UA

You can paste this code in a text document or leave the browser window open for Google Analytics. This makes it easier to paste the UA code into your website when you’re ready.

Integrating Google Analytics into WordPress

WordPress has a lot of different tools to use when integrating Google Analytics. For this tutorial, I’m going to use the Google Analytics Dashboard for WP. Not only is this one of the most trusted plugins for adding the function, it also comes with a dashboard widget so you can quickly check stats without logging into Google directly.

In reality, you can install any plugin you wish to use for Google Analytics. I simply find this one to be very user friendly and extremely easy to use.

Go to the Plugins area and click, “Add New.”

Add New Plugin

Enter “Google Analytics” in the search box.

Google Analytics

Because there are so many plugins related to the search, you want to make sure you select the correct one for this tutorial. I am using the plugin developed by Alin Marcu. You may also identify it by the thumbnail graphic used in the plugin database. Either way, install and activate this plugin.

Install

The easiest way to connect your Google Analytics UA code to WordPress is by authorizing the plugin on Google. In fact, WordPress will automatically populate the correct UA code for the website if you used the correct domain name when setting up your Google Account.

Click on the Google Analytics tool that is now displayed in the left column of your WordPress dashboard.

Google Analytics Tool

The first page you’ll see is the Plugin Authorization screen. Click the “Authorize Plugin” button.

Authorize Plugin

Click the link to “Get Access Code.” This will open a new browser window connecting your WordPress website to your Google Analytics data.

Get Access Code

After you sign into Google, it will ask you for permission regarding the plugin. Click the “Allow” button on the bottom right.

Allow

Google will then provide you with an authorization code for WordPress. Copy the entire line of text.

Analytics Code

Paste the code into WordPress and click “Save Access Code.”

Google Analytics Access

If you used the exact domain of your website in Google Analytics, it should be the default view. However, you can use the drop down to select your website property.

After selecting the view, verify the Tracking ID displayed in WordPress is the same as the ID you copied earlier. If these numbers are different, you will actually be looking at the statistics for another website – if you have more than one connected to your account.

Click the “Lock Selection” button to lock the property.

Lock Property

Click the “Save Changes” button on the bottom.

Save Changes

Now, Google will be tracking visitors to your site and you can see your stats from the WordPress Dashboard view.

Building Up Your Website

Google Analytics does so much more than merely show you how many views your content receives. You can track everything from inbound visitors from Facebook to the demographics of those individuals. This is greatly beneficial when developing a content marketing strategy and will more than likely affect what kind of posts you create.

What kind of add-ons do you use for visitor engagement in WordPress? What other Google tools do you like to use?

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.