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.

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.

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.

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.

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.

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

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.

Below it is the Global Site Tag. Here, you can copy your 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.

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.

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.

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.

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

Then connect it to the plugin.

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

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.

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

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!

With the lessons, you won’t end up leaving your site vulnerable to hackers and other cyber attacks. And you’ll also learn expert tactics, such as improving your site’s speed and setting up free uptime monitoring!

Exclusive 7 Day Course

Defend your site from hackers, improve your website speed, get free uptime monitoring and learn tactics used by WordPress experts

Many thanks for subscribing.

Something's not right.

Your privacy is respected and we're serious about protecting it

About Christopher Jan Benitez

Chris is a professional content marketer and writer. He has helped small businesses achieve their goals by implementing a robust content strategy that emphasises unique selling points and promoting created content using effective online channels and methods.