Learn how to install Google Analytics on WordPress – WAU

Installing Google Analytics on WordPress is essential to prove results or make more strategic decisions. The GA installation step sounds extremely technical, but it is simpler than you might think. Check out this step by step how to do this!

As a good marketer would say: “In God we trust, all the rest bring data!” Monitoring and analyzing data has become essential to make a good job of marketing.

Every day you bet on strategies to increase the acquisition of new people for your website or blog, as well as to convert that traffic into leads. You invest in organic strategies, paid media, social networks, email marketing, among others.

At the end of it all, you will want to know if your strategies worked, which ones worked best and what you should invest more in the next few times, right?

Well, the only way to know if you are in fact generating results for your company and if the strategies are working it is using numbers. To do this, you can use Google Analytics – Google’s free analytics tool.

Haven’t you installed Google Analytics on WordPress yet? So continue reading this post learn how to do that!

What are the benefits of using Google Analytics?

Before we get into the installation step by step, it is important that you really understand what Google Analytics is and what its advantages are. Well, in a nutshell, this is a free tool from Google that delivers several analysis parameters about your website.

Some of the main advantages of using Google Analytics are:

  • the tool is free;
  • you can see quantitative analyzes of your site (how many people visited, time of each session, etc.)
  • it is also possible to see qualitative analyzes (where are the people who visited, what pages were visited, what was the path to reach your site, etc.)
  • it is possible to make a conversion funnel, determining how much financial return a stock has brought.

Now that you know how essential Google Analytics is to your marketing operation, follow the step by step below and see how to install it on WordPress!

How to install Google Analytics?

After creating an Analytics account, to access your website data, you will need install Google Analytics on WordPress.

In this post, we cover the two most common ways to do this: by plugin and by inserting the code directly into your WordPress template. If you want quick and easy integration, the plugin may be the ideal option for you!

In any case, if you choose a more manual path, we recommend that you notify your developer to ensure a backup of the site.

Step by step to install Google Analytics via plugin

The most famous Google Analytics plugin on WordPress it’s MonsterInsights, and that’s what we’re going to use in this step by step. More than 1 million sites use it and its free version already provides the Analytics view for most features.

The first step here is to install and activate the MonsterInsights plugin. To find it, just login to WordPress and click on “plugins” in the left bar.

Step by step to install Google Analytics via plugin

When entering the plugins screen, look for “MonsterInsights”:

install Google Analytics via plugin

Then click on “Install now” and then on “activate”. Then, the plugin will display the following window:

install Google Analytics via plugin

Choose the category of your website – Business, Publisher or E-commerce -, save and continue.

Right after this page, another one will appear with a button to connect Analytics to WordPress. Click this button to continue the configuration.

install Google Analytics via plugin

When you click the button, the plugin will take you to a Google login pop-up. At that time, select your Google account linked to Analytics. Once you select the account, click on “Allow”.

install Google Analytics via plugin

We are almost there! Now it’s time to select the website you want to review. To do this, simply indicate the domain and click on “Complete Connection”.

install Google Analytics via plugin

MonsterInsights will ask you about the settings for your website. You don’t have to worry so much here – the default settings work for most sites.

install Google Analytics via plugin

The next two screens that you will see offer optional features that are not linked to using Analytics itself. The first of these features other MonsterInsights products and upgrades. The one that follows talks about another plugin, WPForms. You can just skip these sections.

install Google Analytics via plugin

Ready! With just a few clicks, Google Analytics is already set up on your site! You will see a message like this:

install Google Analytics via plugin

The good news is that if you want to see analytics reports within WordPress itself, this is possible through MonsterInsights! Just go to the insights section on the left menu.

install Google Analytics via plugin

Were you unable to install Google Analytics by plugin, or would you prefer another process to do this installation?

Do not worry! Below we will teach you how to install Analytics directly in the template code.

Step by step to install Google Analytics by WordPress theme

Before entering the installation step by step through the WordPress theme, it is important to note that here we are going to tinker with code. So, if you don’t have a thorough knowledge of this, talk to your developer to make sure there is a backup your website.

In this more manual process, it is also important to say that you need to use an original WordPress theme, to prevent your tracking code from disappearing whenever you update your template.

Now entering the step by step, the first thing you will need to do is access your Analytics account and click on the gear in the lower left corner. Once this is done, select “tracking information” and after that “tracking code“.

Google Analytics by WordPress Theme

When selecting “tracking code”, you will see a page like this:

Google Analytics by WordPress Theme

One of the elements that you’ll see on this page is the famous tracking code, or “tracking code“, And it’s going to send your website’s information to Google Analytics.

Copy this code and now we are going back to Wodpress, in the editor inside “Appearance“.

Google Analytics by WordPress Theme

Once in the editor, we’ll paste the code into the file “header.php“. To access it, just click on the header link, located on the right side:

Google Analytics by WordPress Theme

Is it already in the header? Calm down, we’re already in the final stretch! Now, let’s paste here the code that we copied from Google Analytics.

Important: this script needs to be placed soon before the tag .

Google Analytics by WordPress Theme

To finish, click on “update file” and ready! Google Analytics will start reading your site’s information after that.

See how easy it is to install Google Analytics on WordPress? We hope that with this step-by-step you have successfully managed this integration in order to start collecting information from your website.

If you are looking for more tips on how to become an expert on this tool, read our full Google Analytics ebook!