How To Add Google Analytics to WordPress (Step by Step Guide)

Google Analytics in WordPress Featured image

Google Analytics is one of the best and widely used tools in any website owner’s arsenal. In this information age, data is power. And with all the data you can get from Google Analytics, you’ll surely be able to learn how to play your cards right and know what to do to improve your visitor count.

By using Google Analytics, you’ll be surprised to know how much you can optimize your site content to cater more to your audience.

Don’t worry, it’s not as complicated as it looks. In this guide we’ll show you everything that you need to know. From explaining what it is, to showing you how it works.

Let’s get right into it.

Google Analytics — a Brief Overview

Before we dive in on the actual process, it does help to learn even the basics of what Google Analytics is and what its used for. It’s the best way for us to learn how you can use it to your advantage.

What Is Google Analytics?

In technical terms, Google Analytics is a web analytics software. Simply put, it’s a set of tools that track and report website traffic. These tools help you better understand your customers, their actions and interactions on your website, and even of what demographic they belong to.

Google Analytics works by adding code on pages of your website. This code then allows for data about page requests to be gathered and sent to the Analytics server.

Since Google makes this software available to users over the Internet, it’s a good example of what’s known as SaaS (Software as a Service).

How Do I Use Google Analytics?

In a nutshell, there are 4 steps to getting started with Google Analytics:

  1. Create or sign in to your Analytics account
  2. Set up a property in your Analytics account
  3. Set up a reporting view in your property
  4. Add tracking code to your website

The next sections will cover each of these in detail.

Creating a Google Analytics Property for Your Website (Step-By-Step)

Before anything else, it’s helpful to understand what a property is. In everyday use, property refers to a thing or things belonging to someone.

This isn’t much different in Google Analytics. A property is a website, mobile application, or blog belonging to someone, and that is associated with a unique tracking ID.

What this means for you is that you don’t need multiple Analytics accounts, even if you own many websites or properties. Instead, you can add multiple properties with unique IDs and tracking codes.

With that out of the way, let’s use some handy instructions to create a property for your site(s), rinse and repeat this process as necessary.

Step 1. Sign in to Google Analytics

Go to You’ll be asked to create a google account or sign into an existing one. It’s also possible to access Analytics through a linked Google Ads account by clicking Tools > Measurement in your Google Ads account.

Homepage of Google Analytics

Step 2. Open the Admin Screen

Once you’re signed in, there’ll be a sidebar on the left. Click the Admin link located near the bottom.

The page that opens will have 3 columns:

  • Account
  • Property
  • View
Admin section of Google Analytics

Step 3. Select/Create Your Analytics Account

In the Account column, use the dropdown to select the account to which you want to add a property.

Unless you’ve already been using Google Analytics, you don’t have to worry much about this column right now.

Keep in mind that what is listed here are Google Analytics accounts and not regular Google accounts.

Pro Tip: Google recommends that a given web property only be tracked in one Analytics account. So avoid tracking a single web property in different Analytics accounts.

That’s it for this column! You guessed it, we’re off to the property column.

Step 4. Set up a Property

In the property column, click the Create Property button.

On the screen that opens you’ll be asked what you’d like to measure. Go ahead and choose Web (Measure your website).

Set up measure in Analytics

To proceed, you’ll need to scroll to the bottom and click Continue.

Time now to add some basic details about your property. Here’s an image showing the page you’ll see after choosing what to measure.

Google Analytics property setup

And here’s what some of them are:

Website Names – In case there’s any doubt, this is the name you’ll use to identify your property in Google Analytics. It’s okay if this doesn’t precisely match your WordPress website’s name.

Website URL – You have the option to choose between http:// and https://. Yes, Google Analytics actually treats these differently, in effect as seperate websites. Therefore, you’ll want to check what protocol your website is using at the time.

One way to do this is in your WordPress admin dashboard on your settings page (Settings > General). Look at the WordPress Address (URL) field and see if the address uses http or https.

Industry Category – There are very few categories here. So never mind if you don’t see your specific category, just pick the one closest to it.

Reporting Time Zone – The time zone you select is used by Analytics as the day boundary for your reports. And once again no big deal if you don’t see your country listed here. You can simply choose another country that uses the same time zone as you.

Now click the Create button. At which point you may be asked to agree to some terms of service/privacy policies.

You will then see a success message before being taken to the Tracking info screen. One of the first things you’ll see there is your Tracking ID.

Your tracking ID tells Analytics which account and property to send data to.

Voila, your property is ready!

However, if you check the status of your newly created property, it says ‘No data received in the past 48 hours’. Let’s change that by doing just a little more work.

You can get your tracking code any time by clicking Admin, and then opening Tracking Info > Tracking code, in the property column.

The tracking code is clearly identifiable in the section labelled Global Site Tag (gtag.js).

Adding Google Analytics Code to Your Website Using MonsterInsights

MonsterInsights is one of the most popular Google Analytics plugins. One thing people love about MonsterInsights is how easy it is to set up. Let’s see what that setup process looks like:

Step 1. Install and Activate MonsterInsights

In your WordPress dashboard, go to Plugins > Add New. Type monsterinsights or google analytics in the search bar. Once the results turn up, click Install Now and then Activate.

Step 2. Launch the Install Wizard

After activating MonsterInsights, you’ll be taken to a welcome page. Click Launch the Wizard! on that page.

MonsterInsights install wizard

Next, time to choose the category which best describes your website from a list like this one:

  • Business Website
  • Publisher (Blog)
  • Ecommerce

Based on your choice, MonsterInsights will recommend the optimal settings for the plugin.

Choose website category

On the following page, click Connect MonsterInsights. This will take you to a Google Sign in page.

Once you’re signed in, Google will ask you whether or not you wish to allow MonsterInsights to access your Google Account. Click Allow to proceed.

And now, it’s time to pick the Analytics view that you want MonsterInsights to use for your reports. The default is “All Web Site Data”, which is a great starting point and you can create more views in the future.

Step 3. Review Recommended Settings

This is what our settings look like since we chose “business website” on the very first page:

MonsterInsights recommended settings

Pro Tip: Hover over the ‘i’ icon and toggle button for useful tips about each option, including explanations on how MonsterInsights produces the desired results.

You can also cancel your changes at any time during the setup by clicking the Exit Setup button in the top-right corner of the page.

With that said, click Save and continue when you’re happy with the settings. Afterwards you’ll be given the option to purchase “Recommended Addons”, click Save and continue to skip ahead.

Now, MonsterInsights will recommend even more addons, these are totally optional. Be careful which button you click here so you don’t unwittingly install something you don’t want in the first place. So on the last screen click Skip this step.

Success! You should now see a message like so:

MonsterInsights install message

Go ahead and click Finish Setup to exit the installation wizard.

Pro Tip: Even when Google Analytics is properly set up, it doesn’t send the data back to WordPress immediately. And it can take some time for reports to populate.

Taking Advantage of Google Analytics

After adding Google Analytics to your WordPress website. What’s next?

Well, data about your website is now being collected and will be readily available when you need it. But truth be told, without a plan, all of this hard work could easily go to waste. And that happens a lot.

We want to make sure that doesn’t happen to you. Google sends out an email once a month summarizing the previous month’s data for one of your Analytics properties.

We recommend staying up to date by getting this report delivered to your inbox. You can do that by visiting Admin > User settings and then selecting Performance Suggestions and Updates.


Thanks for checking out this complete guide to Google Analytics. In this post, we covered how to set up Google Analytics and use it on your WordPress website. Care to know which plugins make for the best experience when combining the power of WordPress and Google Analytics?

Check out our post on the Best WordPress Google Analytics Plugins.

Disclosure: This blog may contain affiliate links. If you make a purchase through one of these links, we may receive a small commission. Read disclosure. Rest assured that we only recommend products that we have personally used and believe will add value to our readers. Thanks for your support!

  1. Ulyssys Profile Pic

    I really find it hard to understand this Google analytics thing, but you explained it very clear now.
    Please come up with more articles about this, I am following all your post. They are always informative and accurate.

    Great job! Keep it up!

  2. Cluadine Profile Pic

    This is really a complete guide. From start to finish I am learning a lot. Can you include in your next blog post more plugins to use for google analytics. I will follow this guide and tell you my experience. This article made my day now.

  3. Nery Profile Pic

    Very well written! This step by step on creating google analytics property is what I’ve been looking for. Looking forward to see more of your posts and learn from your expert team.

  4. Katrina Profile Pic

    You have given me all the information I need to understand google analytics. It is something that is unknown to me ever since I started my website. Now I have a clearer picture of what it is and how I can take advantage of is to grow my business. Thanks a lot!

  5. Ruvja Profile Pic

    Learning this tool from you is like enrolling to a training school, very educating and interesting to read. You made mention avoiding tracking a single web property in different Analytics accounts. Can you expound more about this? Or do you have a blog post related to this? I am very much interested. Thank you so much.

Leave a Comment

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

Astra is Free. Now & Forever.

We believe creating beautiful websites should not be expensive. That's why Astra is free for everyone. Get started for free and extend with affordable packages.



Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top