3 ways to link your site with Google Analytics, get to know them

Google Analytics

Do you want to install Google Analytics in WordPress ?

Monitoring your audience’s interaction with your site is crucial to your success .

The best way to know your audience is through your traffic stats, as Google Analytics provides this for free

In this article, we’ll show why Google Analytics is so important, and how you can easily install it on your site.

First, we’ll show you why they’re important and how they can help you grow your site.

Next, we’ll show you how to sign up for an analytics account and the different ways to install it on your WordPress site

Why is analytics important for bloggers ?

Once you start a blog, your first goal is to get more traffic and subscribers. Google Analytics helps you make data-driven decisions by showing you important statistics.

As you can see :

Who are your visitors ?

This piece of analytics answers the geographic location of your audience, the browser the user used to visit your site, and other important information. Like screen resolution, JavaScript support, Flash support, language, etc.

This data is very useful and can help in many ways. When you get a custom design, you can use user data to ensure that your site will be compatible with your audience.

If most users do not have Flash support, then you should avoid adding the Flash element to your site. If most of your users are on a 1280p screen resolution. Then you have to make sure that your design is compatible with this resolution or smaller.

What do people do when they are on your site ?

You can track where users go on your site, how long they stay on your site, and what your bounce rate is (the percentage of users who leave your site on the first visit).

With this information, you can reduce your bounce rate and increase page views. You can also find your articles that are trending, which articles aren’t performing well, and what type of content users are searching for .

When do people visit your website ?

It determines the most active hours of the day for your site. You can choose the time when you publish your articles. If this time zone is not compatible with yours, you can schedule your post to coincide with that hour .

How do visitors find your site ?

Analytics shows where users come from (eg search engines, direct links, referral links from another site). It also shows you the percentage of your visitors who came from each of these sources. Google Analytics gives you a breakdown of each of these categories .

If it’s a search engine category, it will show you the search engine with the most traffic, such as Google, Yahoo, Bing, etc. A breakdown of referral sources also shows you which sites you need to work with the most .

If your source is Facebook, get exclusive Facebook content to make your Facebook audience feel special .

If the source of that referral is an external site, maybe you can partner with that site (guest post exchange or something else) .

How do visitors interact with your content ?

Analytics shows how users interact with site content. Then it shows you the percentage of users who clicked on the link on the site and more.

You can run split A/B testing by creating content experiments in Google Analytics to understand what works best for your goals

So by seeing user interaction, you can work on your content around users. You can also focus on strategies that work with your site and stay away from strategies that do not work. Simply focus on the important stats, so you can make data-driven decisions rather than guesswork .

How to register  ?

Google Analytics is available for free and all you need is a Google or Gmail account to sign up. In addition, the registration process is very simple, follow the step-by-step instructions below to create your own account.

First Step :

Visit Sign Up for Google Analytics. It asks you to sign in with your Google account. If you already have a Google or Gmail account, you can use it to sign in. And only you have to register an account with them .


Second Step :

When you sign in with your Gmail account, you have to fill in the screen as in below. This is where you will sign up for Google Analytics using your Gmail account .


Next, you will be asked to enter an account name. This name will be used inside so you can use anything like your business name.


Third Step :

On the next screen, it allows you to choose between Web or Apps or Apps and Web. Web should be selected .


Next, you need to enter the website name, website URL, country, and time zone.


When you have completed entering this information, press “Next” . You are shown the Terms of Service that you have to agree to, so click on the “I Agree” button .

Fourth Step :

Now you will see the tracking code that you can copy because you will need to enter it in your site depending on the method you use below.

So you can leave the browser tab open and come back again to copy the code when needed .

Google Analytics

It is best to leave the analytics browser tab open as you may need to revisit it, once you have installed the code on your WordPress site .

Now that you’ve set up your Google Analytics account, let’s take a look at how to install it in WordPress .

How to install

There are different ways to set up the installation We will show you three ways, you can choose the one that best suits your needs .

Note : You need to use only one of these methods on your website to avoid double-tracking the pageviews of your account .

Method 1 : By MonsterInsights

It is the easiest and the best way to add analytics (beginners and experts alike) .

Over 3 million websites use it, including the likes of Bloomberg, PlayStation, Zillow, WPBeginner, and more .

MonsterInsights offers both a paid plugin and a free version. You can use MonsterInsights Pro version if you want more advanced features like ecommerce tracking, ad tracking, author tracking, etc. The process of setting it up is the same .

Firstly :

All you have to do is install and activate the MonsterInsights plugin. Upon activation, the plugin will add a new menu item called “Insights” to the admin menu. Clicking it will bring up the MonsterInsights setup wizard .

Google Analytics

secondly :

It prompts you to choose a category for your website (business website, blog, or online store). You can select and click the Save and Continue button. Next, you need to click on the “Connect MonsterInsights” button .


This will bring up a popup that will take you to Google Accounts where it will ask you to sign in or select the account if you are already signed in .

Google Analytics

Then, it will prompt you to allow access to your Google Analytics account .


Click the Allow button to continue.

The last step :

is to select the profile you want to track. You need to select your location here and then click on the Full Connect button to proceed .


The default settings work with most websites. If you are using an affiliate link plugin, you need to add the path you are using to hide the affiliate links. This will allow you to track affiliate links in analytics. Click the Save and Continue button to save your settings. Then, MonsterInsights will show you the paid add-ons that you can access if you upgrade to the PRO version. You can simply click the Save and Continue button to skip this step .


That’s all you’ve successfully installed and configured Analytics on your site. Remember that it will take some time before your stats are displayed and not live.


The best part about MonsterInsights is that you can view analytics reports within your WordPress dashboard. Simply visit the Insights » Reports page to check out a quick overview of your analytics data .

Google Analytics

It also comes with a popular Posts plugin that lets you display top-performing content to boost traffic and page views.


You can use it to automatically add embedded popular post links to boost posts :


If you’re using an online store site, they can also add the best performing products at the end of each blog post to boost sales :

تحليلات جوجل

note : MonsterInsights was previously known as Yoast .

The second method : a plug-in for the header and footer

This method is not as good as MonsterInsights because you won’t be able to do advanced tracking configuration, and you won’t be able to display analysis data in your WordPress dashboard. First, you will need to copy the Analytics tracking code that you copied earlier in Step 4 when signing up for a Google Analytics account .

Google Analytics

Next, you need to install and activate the header and footer plugin. Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics tracking code that you copied earlier in the “Scripts in the header” section .

Google Analytics

Don’t forget to click the Save Changes button to store your settings .

That’s it, you have successfully installed analytics on your site .

Method 3 : Install it in a WordPress template

This method is for advanced users who are familiar with coding. It’s a bit unreliable because your code will go away if you switch or update the theme. So this method is not recommended .

With the same error you need to copy the Google Analytics tracking code that we copied in step 4 when signing up for an Analytics account .

Google Analytics

Now there are two popular ways to add this code in your WordPress theme files. You can choose one of them (not both).

Add the code in the header.php file

Just edit the header.php file in your theme and paste the Google Analytics trace you copied earlier right after the <body> tag. And don’t forget to save the changes and upload the file back to your server.

You can add it via the functions file as well. Then the Google Analytics tracking code should be added to the WordPress functions file. The tracking code will be added to every page on your site. You will also need to add this code to your theme’s function.php file.


View reports on the Google Analytics website

Google Analytics is able to display a treasure trove of data collected from your website stats , Therefore, you can view this data by visiting the Analytics Dashboard .

Google Analytics

As shown in the previous figure, analytics reports are included in the right column. Each section is then divided into different tabs, and clicking on a tab expands it to show more options to show you the next one.
  • In real time This report will show you the actual time of your traffic.
  • The Audience tab reports to help you understand your users.
  • Acquisition reports show where your users come from.
  • Behavior reports summarize what users do after they land on your site.
  • Conversion reports show how well you are achieving your goals.

The ultimate benefit of Google Analytics

Analytics is an incredibly powerful tool with a lot of great features. Some of them are straightforward and easy to use, while others require some additional setup. Here are some resources that will help you get the most out of your Google Analytics reports

  1. Follow up user interaction in WordPress
  2. Track WooCommerce Customers
  3. Track outbound links in WordPress
  4. Read easy WordPress conversion step by step

Analytics works best with Google Search Console (Google Webmaster Tools). It allows you to see your website’s performance in search results.

Check out the full Google Search Console to learn how to use it to grow your site

In case you want to improve your site’s search engine rankings and get more traffic, it is recommended to use the AIOSEO plugin for WordPress which is an SEO toolkit .






Previous post
7 steps to start your online store for 2022
Next post
How to do an SEO analysis for competitors in WordPress

Leave a Reply