man using google analytics on laptop

How to Install Google Analytics on WordPress the Easy Way

One of the awesome things about owning a website is that it can help in growing your business. But if you have no clue about what is and what is not working for your site, you’re going in blind.

Fortunately, Google Analytics will come to your rescue. Installing it will help you answer questions about your business.

If you don’t know how to make it happen, don’t freak out.

In this post, you’ll learn how to install Google Analytics on your WordPress-powered website the easy way. With the help of this tutorial, you can start using Google Analytics immediately!

What is Google Analytics?

Google Analytics Homepage

As a web analytics suite, Google Analytics can tell you what your visitors are doing on your site. It provides you with real-time information that you can easily access from your WordPress dashboard.

And because of this, it should not come as a surprise why it’s such a hit to millions of websites. After all, it holds the key to a site’s performance.

What you can do with it is to use the information it gathered to optimise your site and make it more responsive to your audience. That way, you can unleash its full potential!

Here’s an example. With the information you can harness from the tool, you’re on your way to creating remarkable social media content.

But before you can install Google Analytics, you need to sign up for a Google Analytics account first. Just go the Google Analytics homepage and hit Sign up to register your Gmail account for this.

start analyzing your sites traffic n 3 steps

On the next screen, you will be asked what you like to track. Your choices are Website and Mobile app. Go with Website because you will be installing Google Analytics on your WordPress website.

Google Analytics on Website

Below, you will also need to set up your account. Just provide the appropriate answers for each field.

It’s also important to go over the Data Sharing Settings section. Review the items there and check or uncheck the items as you see fit.

google analytics setting up your account

Google Analytics Timezone

Google Analytics Products

Once you understand everything that you will be signing up for, you can proceed to the next step. That’s by pressing Get Tracking ID to get your tracking information.

Get Tracking ID

Go over the Data Processing Terms. Doing this informs you of what you are signing up for. Read this carefully.

To proceed, check the box next to it if you agree with the terms.

Data Processing Terms

Then do the same for the section below it. It’s called Google Measurement Controller-Controller Data Protection Terms. After, click I Accept.

Google Measurement Controller-Controller

From there, you can get your hands on your tracking ID. Along with it, you’ll find out other information about how you’re using Google Analytics.

Copy Tracking ID

Below it is the Global Site Tag. Here, you can copy your tracking code.

Copy Tracking Code

Step-by-step guide on how to install Google Analytics without a plugin

One easy way to install Google Analytics is to modify sections of your WordPress theme. A small setback to this technique is that it’s somehow dependent on your site’s theme.

This means it can stop working the moment you change your WordPress theme. But this is ideal because it doesn’t require you to install anything. Besides, it comes with a simple fix!

The solution to a small setback? As long as you make it a point to update this technique every time you change your theme, you shouldn’t have a problem.

To proceed with installing Google Analytics without a plugin, here’s what you need to do.

First, go to your WordPress dashboard. Then head on over to Appearance -> Theme Editor -> functions.php. Then paste your tracking code and click Update File once you’re done.

Functions.php-1

Another way to go is to modify your theme’s header.php file. To do that, just find the file in the theme editor. Like the steps earlier show, click Appearance -> Theme Editor -> header.php.

wordpress theme editor headers

In the header.php file, locate the tag. And just right after it, paste your Google Analytics tracking code. Then click Update File to save the changes.

Paste in Header.php

Step-by-step guide on how to install Google Analytics with a plugin

Another way is to use a Google Analytics plugin. MonsterInsights is one of the best in the category. It’s also a very popular Google Analytics plugin.

So go to your WordPress dashboard. In the Plugins section, click Add New. Then search for MonsterInsights, install, and activate it.

Add New Plugin

Install and Activate

Once you’ve installed and activated the plugin, it’s time to set up your website.

MonsterInsights Setup

Then connect it to the plugin.

Connect MonsterInsights

Once you click Connect MonsterInsights, you will be prompted to sign with your Google account. Make this happen to grant privileges to the plugin.

Connect Google Account

And when you’re signed in, MonsterInsights will go over what it’s allowed to do. Review this and click Allow if you don’t have any concerns.

Allow MonsterInsights

Click Allow MonsterInsights

Click Complete Connection on the next screen. Doing so will grant permission to MonsterInsights to install the plugin to your website.

Complete Connection

From here, you can start using the plugin. If you want, you can edit its settings. But like most websites, you can go with the default settings because they work, too.

Remember, Google Analytics takes care of most of the tracking information on your behalf. You can use it for event tracking and affiliate link tracking.

So if you use other tracking plugins such as a plugin to track affiliate links, make sure you add a path to cloak this. Once you’re done with this, you’re all good. Google Analytics will be the one to track your affiliate links for you!

Conclusion

Gearing up with Google Analytics can help you elevate your business. After all, using the right tools is one of the best ways of optimising your sales funnel!