How to Install Google Analytics on WordPress Website

Posted on

How to Install Google Analytics on a WordPress Website. Google Analytics is a free tool from Google that can help us see blog statistics. In this article, I will tell you how to install Google Analytics on WordPress blog easily.

Maintaining a website is not only about creating quality content and then publishing it.

Knowing how visitors interact with your website is also one of the important things that can affect the success of a blog. Fortunately, we can find out this data easily using Google’s free tools, Google Analytics.

For those of you who don’t know, Google Analytics is a service from Google that can give you statistical data and provide analysis tools that are powerful enough to be used in supporting SEO work or marketing planning.

There are many options besides Google Analytics that you can use to display statistical data on a website such as Piwik, Kissmetrics or Gauges. But Google Analytics remains the most popular choice for bloggers, both beginners and experienced.

Why do you need Google Analytics?

“What is the importance of understanding how to install Google Analytics? After all, my website can run well without installing Google Analytics.”

This may be a common question about whether or not it’s important to use Google Analytics to monitor a website. But if you were given a tool that could improve your blog’s performance for free, would you pass it up?

Google Analytics is one of the tools that helps you by providing statistical data that can later be used to compete with other established big players.

There are many benefits you can get by using Google Analytics, including:

  • Knowing how many visitors you get every day. You can even find out how many new visitors and how many are loyal visitors to your blog.
  • Knowing info about visitors such as country of origin, device used, and time spent on your website.
  • Know which posts are the most popular/most read.
  • Know when visitors arrive so you can adjust your post schedule accordingly.
  • Know the bounce rate – The percentage of visitors who only view one page and then leave.
  • And there’s so much more.

These are just a few of the features that Google Analytics offers, and did I mention that they’re free?

Read: How to Open Webp Files in Photoshop Easily

Google Analytics itself has a premium version that is intended for large companies. You can see the comparison with the free version in the following table. But for personal web use, the free version already has more than enough features.

Read More:  How to Reset Arduino Guide (100% Works)

How to Install Google Analytics on WordPress Website

How to SignUp Google Analytics in WordPress

Google Analytics is one of the many Google services that are free for bloggers. So if you want to use this service, you only need a Google account.

Before we get started, we first need to sign up for a special ID and a script that we’ll need to integrate with our WordPress website.

To get it, log into Google Analytics using your Google account and click the SIGN UP button.

How to Install Google Analytics on WordPress Website

Next, we will fill in the fields on the next page.

  • First, there are two platform options you can choose from, WEBSITE or MOBILE APP. Since we will use it for WordPress, we will use the first option.
  • Then there is ACCOUNT NAME. Think of an Account as a folder that you use to organize multiple websites. This is useful if you have many websites that you want to organize in certain categories.
  • Next is WEBSITE NAME which we will fill in with the name of the website that we will register, don’t confuse it with your website URL! because your website address will be filled in the next box on WEBSITE URL.
  • For INDUSTRY CATEGORY, you can choose a category that suits your niche. If you don’t find the right category, you can choose OTHER.
  • Then there is REPORTING ZONE which you can fill with the time zone of the country where your website is located.
  • And finally there is the DATA SHARING SETTING option that you can set to determine how much data access you can give Google to improve the quality of the reports they will provide.

After filling in everything, click the GET TRACKING ID button. A PopUp will appear containing Terms of Service, click the I ACCEPT button to continue.

If so, then you will get a Tracking ID and a script that you can use later to integrate Google Analytics on a WordPress website.

How to Install Google Analytics on WordPress Website

How to Install Google Analytics on WordPress

Now that we have our Google Analytics ID, it’s time to pair it with WordPress. There are several ways you can do this, including:

  1. Inserting the code directly into the WordPress header manually or with a plugin.
  2. Inserting the code through your WordPress theme.
  3. Using the code with a dedicated Google Analytics plugin.

Read: How to Disable RSS feeds on WordPress

You don’t have to do all three.

1. Adding Google Analytics Code Manually Through the WordPress Header

I’ve explained before how to easily add a code to your WordPress header, either manually or with the help of a plugin.

To add it manually, you can do so through your WordPress dashboard via the “DISPLAY” menu and search for the header.php file.

Insert the code you got earlier between the <head> and </head> tags.

NOTES: This way, your code will be lost if you change your theme. So make sure you do it again if you still want to monitor your website.

Read More:  How to Migrate WordPress from Hosting to Other Hosting

For those of you who prefer to use plugins, you can use plugins like Header and Footer to simplify the above process. Simply install and activate the plugin, then input the code from Google Analytics.

Save, done.

2. Adding Google Analytics Code Through Themes

Some premium themes have the option to easily enter the Google Analytics Tracking Code or Google Analytics Tracking ID.

If you are using the Divi theme from Elegant Themes, select the DIVI menu ” THEME OPTIONS ” INTEGRATION. You can put the code in the header although Divi suggests putting the code in </body>. But it doesn’t matter, you can use either one.

Don’t forget to activate the header code or </body> so that the Google Analytic code can work properly.

How to Install Google Analytics on WordPress Website

For those of you using the Genesis theme from StudioPress, simply log into your WordPress dashboard and select the GENESIS ” THEME SETTINGS menu. Scroll down until you find the HEADER AND FOOTER SCRIPTS option. Enter the Google Analytics code in the HEADER SCRIPTS box, then save.

How to Install Google Analytics on WordPress Website

3. Adding Code with a Google Analytics Custom Plugin

While you can use plugins like Header and Footer as I mentioned earlier, using a dedicated plugin is a way to install Google Analytics that will give you many advantages such as the ability to view graphs and statistics from Google Analytics directly through your WordPress dashboard. Also, you don’t have to re-verify your Google Analytics code if you change your theme.

There are many plugins you can use such as Google Analytics Dasboard for WP, WD Google Analytics, or Google Analycator. But here I will use one of the most popular plugins, Google Analytics by MonsterInsights.

How to Install Google Analytics on WordPress Website

Once you have installed and activated it, go to the INSIGHTS ” SETTINGS menu to activate Google Analytics on your WordPress website.

There are two ways you can authenticate Google Analytics through this plugin.

The first way is by pressing the AUTHENTICATE WITH YOUR GOOGLE ACCOUNT button. After that, a popup will appear asking you to connect this plugin with your Google account. If you are already logged in, a verification code will appear that you can copy into the plugin. Finally, you just have to choose the website profile that you will display on the Insights plugin dashboard.

The second way is to enter the Google Tracking ID manually. Simply enter the code that you have obtained into the box provided.

One thing you should note, you will not be able to use the Insights dashboard if you use this method.

after done editing, then click button SAVE SETTINGS.

Check if the Google Analytics code is working?

After you’ve finished installing Google Analytics on your WordPress website, you might be wondering, “why do my graphs look flat? Did I do it right?”

If you’re asking the same question, don’t worry!

Read: How to resolve the “ERR TOO MANY REDIRECTS” error in WordPress

Read More:  How to Downgrade WordPress to a Previous Version

Google Analytics takes time to collect data to create the reports, so it’s normal that you won’t be able to see them immediately after installing Google Analytics.

So how can you check if Google Analytics has been successfully installed?

For those of you who are curious, you can log into Google Analytics and go to the ADMIN menu ” TRACKING INFO ” TRACKING CODE. Here you can see the status of the tracking ID that you have installed. You can also send TEST TRAFFIC to check whether this Google service is working properly or not.

How to Install Google Analytics on WordPress Website

View Website Statistics on Google Analytics

To view the statistics report, you can simply go to the REPORTING menu at the top of the Google Analytics dashboard. If your data is sufficient, you can see a graphic display that by default will show the number of visitors who come to your website.

How to Install Google Analytics on WordPress Website

To see other performance parameters, you can select the menu in the left column.

If this is your first time using Google Analytics, it might be a little overwhelming because there are so many metrics used to measure your website.

Some of the areas that you need to look at first in Google Analytics and may also need to monitor regularly include:

  • Audience ” Overview – To find out how many visitors are coming.
  • Acquisition ” All Traffic ” Channels – To see where the traffic comes from, whether from organic search, ads, social media, other sites, etc.
  • Behavior ” Site Content ” All Pages – To find out several metrics such as pageviews, average time, and bounce rate from each of your posts and pages.

NOTES: The data in Google Analytics will only take into account data from the time you install the code on the website and does not take into account previous data.


Google Analytics is a very powerful tool in helping you analyze the strengths and weaknesses of your website. And the great thing is that all the features in this service are free. So there is no reason not to do it even if you don’t use it now. Isn’t the more data the better?

If you have installed it, don’t forget to filter Google Analytics so that data coming from your IP address is not tracked. That way, you can get more accurate data.

For those of you who use Blogspot blogs, don’t worry! There is a way to install Google Analytics on Blogger too!