How to Add Google Analytics to WordPress

How to Add Google Analytics to WordPress

0 Shares

Keeping track of your website’s analytics is crucial in running a successful website.

Tracking your website traffic allows you to gather data about who visits your website and how they interact with it. This will help you gain valuable insight on how to engage more with your visitors, or how to improve your website. 

What is Google Analytics?

Google Analytics is a website tracking tool that collects data on how users interact with your website. It is one of the widely used traffic analytics tools and the best part about it is that it’s free!

Why is it important? Through Google Analytics, you are able to measure the effectiveness of your digital marketing campaigns. You can track whether your website is getting enough traffic, what your website visitors’ demographics are, and whether you are getting conversions, and how your website visitors are interacting with your website.

This way, you can make decisions about your website based on insights you derive from Google Analytics data.

How to Signup with Google Analytics

First, go to Google Analytics and click Start for free to create a Google Analytics account.

If you’re not already logged in, enter your personal or work email credentials, or create a new account! 

You will then be redirected to the Google Analytics platform. Click Start Measuring to start your sign up in Google Analytics.

Now, it’s time to set up your account. Enter your account name, and select what account data you are comfortable sharing with Google. They have pre-selected options but you are free to deselect them if you’d like to! 

Next, set up your Property. Properties on Google Analytics are basically a website, a mobile application, or a blog that you can track. Enter the name you’d like to label your property–don’t worry about how you label it; you can change this later.

Then, select the time zone that you want the data to be recorded in. For example, if you are in Australia but you select US Pacific Standard Time, the data will be recorded following the US PST time zone. Additionally, select the currency that you want to follow. This will be the currency that will be used in measuring the value of your pages, as well as the revenue you get from your website (if applicable).

The property set up section has an advanced option where you can toggle whether you want to add a Universal Analytics property. This is basically the previous version of Google Analytics. We recommend turning this on, in case you decide to install WordPress plugins that help out with implementing Google Analytics in your website, such as MonsterInsights (more on this later).

If you’d like to continue, just click the Next button.

The next step is to input some information about your business. Check or select all that apply, and once you’re done, click the Create button.

After that, you will be prompted to read and agree with Google’s Terms of Service Agreement and their Data Processing Terms. If you don’t have any issues with the aforementioned agreements, click the I Accept button to continue to the next step.

You will then be directed to the interface of Google Analytics 4. A modal asking you about what types of communication you want to receive from Google will appear. Select the options that you would like to receive, otherwise, click Save and you’re almost done setting up your account!

In the next step, you will be asked to choose the platform that you want to measure–whether it’s a website, or a mobile application. Choose Web, and you will be prompted to enter some information.

Enter your website URL and label it with a name. You will see that enhanced measurement is preselected. This means that Google Analytics will be measuring interactions made in your website beyond the standard page view measurements.

Now your account on Google Analytics is all set up! This is how it should look like when you’re done:

But don’t get too excited–we still have some work to do to actually implement Google Analytics on your website. Let’s get on to it!

Adding Google Analytics to Your WordPress Website

There are two ways that you can add Google Analytics to your site. One is by using WordPress plugins to help out, in this tutorial, we will be showing how to do it using MonsterInsights. The other by adding codes manually to your site’s HTML header. 

Adding Google Analytics Using a WordPress Plugin

MonsterInsights is a widely used Google Analytics plugin for WordPress. It’s available for free, but there’s a premium version that, of course, offers more features.

Most users prefer using MonsterInsights because you can easily view your data within the comforts of your WordPress dashboard, and the set up is pretty easy!

Keep reading to learn how to add Google Analytics to your site using MonsterInsights.

First, install and activate the MonsterInsights plugin. You can do this by going to their plugin page, or simply look for it in the plugin repository while logged into your site’s admin.

Once activated, you should be directed to the MonsterInsights plugin dashboard. Click the Launch the Wizard button to start the set up process.

On the first page, select the category that your website best falls under.

You will then be prompted to connect your Google account to MonsterInsights.

Sign into Google using the account you used to set up your Google Analytics account.

Allow MonsterInsights access to your Google Analytics account.

You will then be redirected to MonsterInsights to continue the set up. You should see the URL of your website in the drop down menu.

Customize the settings to your own preference, such as updating the affiliate link tracking to your own links (or none at all), adding or deleting user types that can see the reports, toggling whether you want the plugin to update automatically, and whether you want to send data about your usage of MonsterInsights.

Once you’re done, click Save and continue and you will be given the option to add any additional features. However, these are premium features and you will have to pay a fee to add them. For our purposes, we will be only using the free plugin.

Click Save and continue. Don’t worry, we’re almost done! In the next step, you will be offered to install WPForms. It is a popular Form plugin on WordPress. If you’d like to install it, click Continue & Install WPForms. Otherwise, click Skip this Step to finally finish the set up process.

Congratulations! Now you are finally set up, and Google Analytics will start tracking your website traffic, and you will be able to view all the data within your WordPress dashboard.

Click Finish Setup & Exit Wizard, and you will be redirected to the MonsterInsights page of your dashboard.

How easy was that? Keep in mind that you have to wait a bit of time before you see any data recorded. Feel free to look around the MonsterInsights interface to get yourself familiarized with it. You can easily access it by clicking on Insights on the left menu panel.

Adding Google Analytics to Your Header Code

The second way to allow Google Analytics to measure your website traffic is by adding your Google site tag to your HTML header code. You should remember your site tag from when you finished setting up your account. It looks like this:

Take note of this tag as you will be needing it later.

First, you will need to install and activate the Insert Headers and Footers by WPBeginner plugin. You can download it from this page, or by searching for it in the plugin repository in your site admin.

Once you’ve activated the plugin, it should appear in the Settings section of the left panel. Hover over Settings, and click Insert Headers and Footers.

Remember the site tag we took note of? Copy it from Google Analytics, and paste it onto the text field in “Scripts in Header”. It should look like this:

Finally, click Save.

Now, you’re all done! Keep in mind that you should wait at least 24 hours before you get any data recorded into your Google Analytics.

By choosing to go this route, you will have to access your data by going to the Google Analytics platform.

Make the Most Out of Google Analytics

The interface of Google Analytics may seem jarring or daunting at first. However, once you get the hang of it, you will be a master of the analytics tool in no time! Check out Google’s Analytics Academy, their very own resource for learning about all things Google Analytics!

You could also check out MonsterInsights’s documentation for any troubleshooting or to learn more about the plugin.

We hope this tutorial was helpful to you! ❤️

Want to learn more
about Stackable?

Your very own Learning Hub for all things WordPress and Stackable. Find the right resources to help get you started as you begin building your online presence with Stackable.

Leave a Reply

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.