TrustPulse Marketing Blog

Actionable advice to boost your website conversions.

Featured image Add Google Analytics WordPress

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

Do you want to add Google Analytics to WordPress to grow your traffic?

By using Google Analytics, you’ll gain a deeper understanding of your audience. It’s the best way to get to know your site visitors and give them exactly what they want. That’s why if you want to increase your traffic, you need Google Analytics.

The problem is that it’s not always straightforward to install or use this important tool.

Fortunately, it’s easy to add Google Analytics to WordPress using a plugin.

By the end of this article, you’ll know exactly how to add Google Analytics to your WordPress site with and without a plugin.

Why Add Google Analytics to WordPress

There are several reasons why you should add Google Analytics to your WordPress site.

Google Analytics tracks your website traffic and tells you how people are engaging with your site. You’ll be able to uncover your most popular pages, offers, and traffic sources. Instead of guessing which content and campaigns your audience loves, you can check the stats for yourself.

Google Analytics dashboard

Using Google Analytics, you can view:

  • Top performing content
  • Biggest referral sources
  • Length of time readers spend on your site
  • Bounce rate

You’ll also be able to learn more about your audience, like where they’re from and the devices they use to browse your site.

Google Analytics insights

This information will guide the choices you make about content and marketing campaigns.

For instance, if you’re a content publisher, you can use the insights to create better content for your readers. As a result, you’ll be able to increase the time people spend on your site and even decrease your bounce rate.

Online store owners can track the point of sale, determine when shoppers abandon their carts, and identify their highest converting pages. This gives you the data you need to improve your checkout process and encourage sales.

As you can see Google Analytics helps you answer so many questions about your audience.

So, you might be wondering how do I add Google Analytics to my WordPress site?

The good news is that it’s incredibly easy to add Google Analytics to your site.

You simply need a Google account and 10 minutes.

Let’s begin.

How to Add Google Analytics to WordPress

Adding Google Analytics to WordPress is quick, simple, and free.

Here are the methods we will use today:

  • Method 1: Connecting to Google Analytics using a reliable tool
  • Method 2: Adding Google Analytics Tracking Code into WordPress theme

Now, the recommended method is adding Google Analytics to WordPress with a tool. That’s because it’s the easiest way, and you won’t have to write any code or worry about editing your WordPress theme.

Before we get into the details, we’ll need to create a Google Analytics account.

If you have already have a Google account, you’ll need to sign in to set up Google Analytics.

Once you’re logged in with your Gmail account, you’ll be able to sign up for Google Analytics.

Google Analytics home page

Now, you will need to provide an account name. This is for internal use. You can add multiple website properties under this account name.

Click the Next button to move to the next step.

Name Google Analytics Account

Here, you will need to add your property details. This is specific to your website. So enter a name that represents your website or business.

You can select your timezone and then click the Next button once you’ve added your details.

Property set up in Google Analytics

After this, you can select your business information. This will help Google tailor the data according to your business needs.

Business info in Google Analytics

Now, you’ll need to accept Google’s terms of the agreement. Tick the two checkboxes and then scroll to the bottom to find the ‘I Accept’ button.

Accept terms in Google Analytics

Once done, the Google Analytics dashboard will open. Here, you’ll see 3 options to set up a data stream. You’ll need to select the ‘Web’ option.

Google Analytics set up stream

Next, you can enter your website’s URL and a stream name and then click on the ‘Create Stream’ button.

Setup data stream in Google Analytics

Google will create a measurement ID and stream ID, along with a tracking code.

You can find this tracking code under the ‘Tagging instructions’ section. You’ll need to open the Global Site Tag tab and then copy this tracking code.

Global site tag in Google Analytics

Now, you’ll need to add this tracking code on your WordPress site in order to connect Google Analytics to your website.

It can be quite technical to do so. So we’ll show you two ways to add it to your site, using a plugin and manually entering the code.

Method 1: Installing Google Analytics Plugin on WordPress

We’ll start with the simplest method for adding Google Analytics to WordPress.

For that, we’ll use the MonsterInsights plugin.

MonsterInsights is the best Google Analytics WordPress plugin because it comes with an easy to use dashboard and powerful features.

monsterinsights homepage-min (1)

Now, we know Google Analytics offers a lot of data. That’s a good thing. But it can be overwhelming to sort through the reports to find meaningful information. With MonsterInsights, you get to view the most important statistics right from your WordPress dashboard.

All you need to do is download the plugin and view your reports from the dashboard.

MonsterInsights dashboard

With MonsterInsights, you get:

  • Access to your analytics right from inside your WordPress dashboard
  • Quick Google Analytics set up without writing any code
  • Easy to understand audience and content reports

This is why it has more than 2 million active installs and the most popular Google Analytics plugin for WordPress.

One of the best things about the MonsterInsights plugin is that it’s regularly tested and optimized for speed. So it won’t slow down your site which is good for SEO.

Below, we will walk through how to set up MonsterInsights in 5 minutes or less.

First, you need to download and activate the MonsterInsights plugin.

After activating the plugin, you’ll see the Insights tab in your dashboard.

Select it to open up the MonsterInsights dashboard and inside, you’ll see an option to Launch Setup Wizard.

Start Monsterinsights wizard

This will start step by step instructions for you to install Google Analytics.

On the next screen, you’ll need to select which category best describes your site.

Monstersinsights welcome screen

After your ‘Save and Continue’, you’ll see a page that lets you instantly Connect MonsterInsights.

Connect to Monsterinsights

You’ll need to sign in to the same Google account that you did earlier when you set up Google Analytics.

Click the Allow button to add Google Analytics to your WordPress site.

Allow MonsterInsights to Access Google Analytics

MonsterInsights will fetch your account. All you need to do is to select your website and click the Complete Connection button.

Complete connection in MonsterInsights

Now, MonsterInsights will do the technical work and add Google Analytics to your WordPress site without any risk.

Keep in mind that it will take some time for Google Analytics to show your statistics.

Once you’re up and running, you can view your data right from your WordPress dashboard.

Method 2: Adding Google Analytics Without a Plugin

The second method is adding your Google Analytics code in WordPress without a plugin.

Bear in mind, you’ll be editing your website theme, and this could break your website. You’ll also need to reenter the tracking whenever you switch themes.

Any misstep here could lead to a blank or malfunctioning site. So before adding the Google Analytics code to your site, it’s a good idea to backup your site.

First, make sure you’ve copied the tracking code in your Google Analytics account.

Google analytics tracking code

Now, head over to your WordPress dashboard.

From the dashboard, click Appearance. Next, click Theme Editor. If you don’t see this option, your security plugin or developer may have disabled it for you to secure your site from hackers. You’ll need to contact them to enable it.

Choose Theme editor

Inside the Theme Editor, from the left-hand menu, select Theme Header.

Choose Theme Header

Now, just before the closing head tag, paste the tracking code. Make sure you leave everything else as is.

Closing head tag

Exit the editor and that’s it. You’ve added Google Analytics to your site.

Now, you’ll be able to track your site visitors and how they engage with your WordPress site.

We hope you found this article helpful.

Using Google Analytics is one way to turn your website into a business tool. If you’re hungry for more resources on growing your business using your website, check these articles:

There you have practical resources and strategies for using analytics to gain a deeper understanding into your audience. This means you’re one step closer to creating the content and offers they truly want.

Author Photo
Published by Bronwynne

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Increase Trust, Conversions and Sales NOW
Try TrustPulse 100% risk-free for 14 days!