How to Properly Install Google Analytics on WordPress?

This article will help you properly install Google Analytics on your WordPress website. You will be able to add Google Analytics to your website after reading this article. I have added a screenshot of each step, so you will have no difficulty understanding the topic.

Google Analytics is a Google product for measuring the statistics of websites. It can tell you how many visitors came to your website, what was their location, age, gender, etc. it also gives you the performance metrics of the website also such as speed and loading time of pages, etc. I will write articles on all topics related to Google Analytics which can be found at the bottom of the page under the heading, “Related Posts”.

Why is data important for websites?

Data acquisition is the first thing digital marketers do for website optimization and conversion. It is an important factor that provides valuable insight into the behavior of users on a website. Data provide the following valuable information about any website.

Understanding user behavior

The behavior of users can be analyzed if we have data about that website. It tells about how users interact with the website, what content is engaging, and what factors lead to conversion. Marketers use this information for optimizing websites, their content, and user experience in order to obtain better conversion rates.

Tracking Performance

The performance of the website can also be judged if we have enough data. Based on this data, website owners track performance, traffic volume, bounce rate, time on site, and conversion rate.

Improving SEO

Data can also help improve search engine optimization. It helps SEO experts to identify keywords that drive traffic to the website. Once the keywords and their position is known, an SEO expert can then tweak the content or structure of the website to increase its ranking of the website.

Decision making

Data is also very helpful in every type of decision-making and hence for the website. The decision about improving the design of the website, content improving strategies, and adding other value to the users. Data can help identify the areas of a website that don’t perform well and take action to improve them.

How does Google Analytics record user data?

Google Analytics records user data with the help of page tags. This is done with the help of a JavaScript code inserted into the head section of each page that you want to monitor. When a user arrives on that page, JavaScript code runs in his browser. Data collection starts from here and this data is then sent to the data collection servers of Google. Based on this data, Google Analytics generates reports in pre-defined formats. This consists of the number of users that visited the website in a specified time duration, total pageview, total sessions, session duration, bounce rate, etc. GA data purely relies on cookies, so it cannot record data if the user has turned them off.

Google Analytics records user data by tracking various user interactions on the website, such as page views, clicks, and conversions. This data is collected using a tracking code that is installed on the website’s pages.

When a user visits a website with the Google Analytics tracking code installed, a cookie is created on the user’s browser. This cookie contains a unique identifier that allows Google Analytics to track the user’s interactions on the website.

The tracking code sends information about the user’s interactions, such as the pages they visit, how long they stay on each page, and what actions they take, back to Google Analytics. This data is then processed and displayed in the Google Analytics dashboard for website owners to analyze.

Google Analytics also collects demographic and interest data from users who have enabled advertising features on their browsers or devices. This data is collected using a separate cookie and can include information such as age, gender, interests, and behavior.

What is Google Analytics used for?

We use Google Analytics for the following tasks. The list is very large but the following are the most important and most often used.

  • Monitor the Bounce Rate of visitors.
  • Monitor the time a user spends on your website.
  • Find out which campaigns bring the most traffic.
  • Determine both the best and the worst-performing pages.
  • What are the locations, gender, and ages of your website visitors?
  • Determine the goals based on conversion, the number of pages viewed, or any other criteria.
  • Find out the devices of your visitors. It will let you know whether you need AMP to implement or not.

How to Set Up Your Account?

As you know, Google’s account can be used for all the products of Google. If you have one Google Account, you can use it for Gmail, Google Calendar, Google +, YouTube, or Google Drive. The same account can also be used for Google Analytics and you don’t need to create a new account for Analytics. However, if you wish to create a new account for analytics, you are allowed to do that. Please note that you should not allow any other person to create Google Analytics Account for you. You can grant access to your analytics to your developer, SEO expert, or any other person but full control should be with you and only you.

Follow the following steps for adding Google Analytics to your website.

Google Analytics Start
  • Click on Sign Up under “Start using Google Analytics”.

If you don’t have an account

Install Google Analytic with new Account
  • Account Name:  Enter a valid name for your account. This can be your name or the name of your business. Each account can have up to 50 properties.
  • Website Name: Enter the name of your website.
  • Website URL: Enter the URL address of your website here. Make sure to enter the correct URL address. If you have SSL active and all your traffic is directed to www then you should add it like this.
  • Industry Category: Enter the niche of your website here from a drop-down list. For example, it can be arts and entertainment, Automotive, beauty, fitness, etc.
  • Reporting Time Zone: Enter the reporting time zone for Analytics. Select your country and the time zone will automatically be selected.
  • Set data sharing options, whether you want to share data or not.
  • Click on Get Tracking ID

If you have an account

Install Analytics with old Google Account
  • Login to your Google Analytics
  • Click on Admin
  • Now click on Create Property
  • You will get all the above options except Account Name.

When you click on Get Tracking ID, you will get the message of accepting license agreement which you will have to accept. After accepting the license agreement, you will get the required code.

How to install Google Analytics on WordPress?

Google Analytics installation is very simple and straightforward. You just need to install a plugin for Google Analytics and authenticate it with the code provided by Google Analytics. There are many plugins for this purpose but we will keep our discussion to the two most commonly used plugins. One is Google Site Kit and the other is monster insight. So let’s get started.

Site Kit by Google – Analytics, Search Console, AdSense, Speed

This site kit developed by Google is the most authentic, secure, and easy-to-use plugin for dealing with many Google products along with Google Analytics. To begin the installation, follow the following steps.

  • Head over to Plugins>Add new.
  • Type Site Kit by Google in the search plugin search box.
  • Click on install and then activate.
Site Kit by Google
  • Go to the dashboard of the plugin
  • Pace check in two options i.e 1: Connect Google analytics as part of your setup. 2: The second option is concerned with the privacy policy.
  • Tap on Sign in with Google.
  • Give permissions to Site Kit for accessing your Google account.

You can monitor all your products including Google AdSense, Search Console, Google Analytics, and the Speed of your website.

MonsterInsights – Google Analytics Dashboard for WordPress (Website Stats Made Easy)

Monster insight also enables you to see Google Analytics data right from your WordPress dashboard. It offers the following features.

  1. Universal tracking
  2. Google Analytics dashboard
  3. Affiliate links tracking
  4. Real-time stats
  5. Page level analytics
  6. Enhanced e-commerce tracking
  7. Custom dimensions

Let’s discuss a step-by-step procedure of how to add this plugin to your WordPress website.

  • Click on “Add New” and search for “MonsterInsights” in the search bar at the top right.
  • Once you find the plugin, click on the “Install Now” button next to it.
MonsterInsight Plugin
  • After installation, click on the “Activate” button to enable the plugin.
  • Next, go to the “Insights” section in the left-hand menu and click on “Settings.”
  • In the “General” tab, click on the “Launch Setup Wizard” button.
  • Follow the prompts to connect your Google Analytics account to the plugin. You’ll be asked to give permission to the plugin to access your Google Analytics data.
  • After authentication, select the website you want to track from the dropdown menu.
  • You can then customize the plugin settings, such as which user roles have access to the Google Analytics data, what data is tracked, and where the tracking code is placed.
  • Once you have configured the settings to your liking, click on “Save Changes.”
  • You will be prompted to install the “MonsterInsights” companion plugin for enhanced functionality. Click on the “Install MonsterInsights” button to proceed.
  • Follow the prompts to install and activate the companion plugin.
  • Once the companion plugin is installed, you can further customize the plugin settings, such as enabling advanced tracking features, setting up goals and events, and integrating with other third-party services.
  • After configuring the settings, click on “Save Changes” to apply them.
  • You can now view your website’s Google Analytics data in the “Insights” section of your WordPress dashboard.


This was all about how to install Google Analytics on your website. I hope you understand the topic clearly. If you have any questions regarding the procedure, you can ask them in the comment section. Google Analytics is a must tool and every website must have it. The data from Google Analytics is a foundation for any SEO activity. It gives you all the statistics which can be used to improve the search engine visibility of your website.

Engr. Rahamd Ullah
Engr. Rahamd Ullah
Articles: 83
Share This