Do you want to add Google Analytics to your WordPress site? Understanding how your target audience interacts with your website is critical to your success.

The best way to get to know your audience is to look at your traffic statistics, which Google Analytics provides for free.

In this article, we’ll explain why Google Analytics is important and how you can easily integrate it into your WordPress website (step by step).

First, we’ll go over why Google Analytics is important and how it can help your website grow.

Following that, we will demonstrate how to sign up for a Google Analytics account and various methods for installing it on your WordPress site.

Finally, we’ll go over how to view your Google Analytics traffic reports.

Here’s a summary of what you’ll learn in this article.

  • What is the significance of Google Analytics?
  • How to Enroll in Google Analytics
  • How to Use MonsterInsights to Install Google Analytics (Recommended)
  • How to Install Google Analytics in a WordPress Theme Using the Insert Headers & Footers Plugin (Advanced)
  • Viewing Google Analytics Reports
  • How to Get so much of Google Analytics

Let’s get this party started.

What is the significance of Google Analytics for Bloggers?

When you first start a blog, your primary goal is to increase traffic and subscribers. Google Analytics assists you in making data-driven decisions by displaying the statistics that are important to you. As you can see,

Who comes to your website?

This section of analytics explains where your audience is geographically, which browser they used to visit your site, and other important information such as screen resolution, JavaScript support, Flash support, language, and more.

This information is extremely valuable and can be used in a variety of ways. When getting a custom design, you can use user data to ensure that your site is appropriate for your target audience.

If the majority of your users do not have Flash support, you should avoid including it in your site. If the majority of your users are using 1280 screen resolutions, make sure your design is compatible with that resolution or lower.

What do visitors do when they visit your website?

You can track where users go on your website, how long they stay there, and what the bounce rate is (the percent of users exit your site on the first visit).

You can also find your most popular articles, articles that are underperforming, and what type of content your users are looking for.

When are people most likely to visit your website?

You can choose the best time to publish your post by looking at the busiest hours of the day for your site. If that time zone does not correspond to yours, you can schedule your post to coincide with that hour.

What methods do people use to find your website?

This section of the analytics explains where the users came from (for example: Search Engines, Direct Links, Referral links from another site).

It also shows you how many visitors came from each of these sources. Each of these categories is broken down by Google Analytics. If it’s the search engine category, it’ll tell you which search engine brought you the most traffic, such as Google, Yahoo, or Bing.

The breakdown of referral sources reveals which sites you should focus your efforts on the most. If Facebook is your primary referral source, you must have exclusive Facebook content to make your Facebook audience feel special.

If your top referral source is an external website, you should think about forming a partnership with that website (guest post exchange or something else).

How do people respond to your content?

Google analytics displays how visitors interact with the content on your website. It shows you how many users clicked on which links on your site and much more.

You can work your content around your users by observing their interactivity. By seeing the answers to the questions above, you can concentrate on the strategies that work for your site and avoid those that don’t.

Simply put, get rid of the guesswork and concentrate on the statistics that matter so you can make data-driven decisions.

How to Get Started with Google Analytics

Google Analytics is completely free, and all you need to sign up is a Google or Gmail account. The sign up process is straightforward; simply follow the step-by-step instructions below to set up your Google Analytics account.

Step 1: First, go to Google Analytics and sign up.

You’ll be urged to sign in using your Google account. If you have a Google or Gmail account, you could also login in with that. Otherwise, you can set up a Google account for yourself.

Step 2: After signing in with your Gmail account, you will be directed to the screen shown below. This is where you will link your Gmail account to Google Analytics.

Following that, you will be prompted to enter an account name. This name will be used internally, so it can be anything similar to your company’s name.

Step 3: On the following screen, you will be given the option of selecting a web, apps, or apps and web. Make certain that you select ‘Web’.

Following that, you must enter the website’s name, URL, country, and time zone.

After entering this information, click the Next button. You will be presented with Google Analytics terms and conditions, which you must accept by clicking on the ‘I Agree’ button.

Step 4: You will now be given your Google Analytics tracking code. You can copy this tracking code because it will be required in your WordPress site depending on the method you use below.

You can also leave this browser tab open and return to copy the code as needed.

We recommend leaving the analytics browser tab open in case you need to return to it after installing the code on your WordPress site.

Let’s look at how to install Google Analytics in WordPress now that you’ve created a Google Analytics account.

How to Install Google Analytics in WordPress

There are some ways to put in Google Analytics in WordPress. We will demonstrate three methods, with the first being the simplest and the last being the most difficult.

You can select the one which best meets your requirements.

To avoid double tracking of page views in your Google Analytics account, use only one of these methods on your website.


Method 1: MonsterInsights’ Google Analytics for WordPress

One of most renowned Google Analytics plugin for WordPress is MonsterInsights. It’s being used by over three million websites, including Bloomberg, PlayStation, Zillow, Your Blog Master, and others.

It is far and away the only and best method for integrating Google Analytics into WordPress (for all users beginners and experts alike).

MonsterInsights is out there as a premium plugin for a fee also as a free version. In this tutorial, we will be using the free version of MonsterInsights.

If you want more advanced features such as E-commerce tracking, Ads tracking, Author tracking, and so on, you can upgrade to the MonsterInsights Pro version. The procedure for configuring them is the same.

Let’s get this party started.

The very first step is to set up and generate the MonsterInsights plugin.

When you generate the plugin, it will create a new menu item to your WordPress admin menu called ‘Insights.’ Once you click on it, the MonsterInsights setup wizard would then appear.

First, you must select a category for your website (a business website, blog, or online store). Choose one and then press the ‘Save and Continue’ button.

Then, click on the ‘Connect MonsterInsights’ button.

This will open a popup window that will take you to Google accounts, where you will be prompted to sign in or select a Google account if you are already signed in.

You will then be asked to grant MonsterInsights access to your Google Analytics account.

To proceed, click the ‘Allow’ button.

The last step is to choose which profile you want to track. To proceed, you must first select your website and then click the ‘Complete Connection’ button.

MonsterInsights will now deploy Google Analytics to your website. Following that, you will be prompted to select the recommended website settings.

Most websites would be fine with the default settings. If you’re using an affiliate link plugin, you’ll need to include the path you’re using to cloak affiliate links. You will be able to track your affiliate links in Google Analytics as a result of this.

To save your options, click the Save and Proceed button.

Following that, MonsterInsights will display paid add-ons that you can gain access to if you upgrade to PRO. To skip this step, simply click the ‘Save and Continue’ button.

Following that, you will be prompted to install WPForms. You can either install it or simply click the ‘Skip this Step’ button.

That’s all there is to it; you’ve successfully installed and configured Google Analytics on your WordPress site. Remember that Google Analytics will take some time to display your statistics.

The best part about MonsterInsights is that it allows you to view your Google Analytics reports right from your WordPress dashboard. To get a quick overview of your analytics data, go to Insights » Reports.

It also includes a Popular Posts addon, which allows you to display your top performing content to increase traffic and pageviews.

You can use it to automatically add popular post links inline to increase engagement:

If you have an online store, it can also automatically add your best-selling products at the end of each blog post to increase sales:

Please keep in mind that MonsterInsights was previously known as Yoast’s Google Analytics for WordPress. Syed Balkhi, the founder of Your Blog Master, bought the plugin in 2016 and renamed it MonsterInsights. It is now a member of our family of premium WordPress plugins.

Method 2. Insert Headers and Footers Plugin

This method is inferior to MonsterInsights because it does not allow for advanced tracking configuration and does not allow you to view Google Analytics data in your WordPress dashboard.

First, copy your Google Analytics tracking code, which you copied in Step 4 when signing up for a Google Analytics account.

The Insert Headers and Footers plugin must then be installed and activated.

After activation, go to the Settings » Insert Headers and Footers page. Paste the Google Analytics tracking code you copied earlier into the ‘Scripts in headers’ section here.

Don’t forget to save your settings by clicking the Save Changes button.

That’s all there is to it; you’ve successfully installed Google Analytics on your website.

3.Integrate Google Analytics into your WordPress theme.

This method is intended for advanced users who are already familiar with the code. It is somewhat untrustworthy because your code will be lost if you change or update the theme. This method is almost never recommended by us.

First, copy your Google Analytics tracking code, which you copied in Step 4 when signing up for a Google Analytics account.

There are two common methods for including this code in your WordPress theme files. You may select either of them (not both).

  1. Insert code into the header.php file.

Simply edit your WordPress theme’s header.php file and paste the Google Analytics tracking code you copied earlier right after the body> tag.

Remember to save your changes and re-upload the file to your server.

Add using the Functions File

You can also include tracking code from Google Analytics. It will then add the tracking code to every page on your WordPress site automatically.

This code must be added to your theme’s functions.php file.

  • <?php
  • add_action('wp_head', 'ybm_add_googleanalytics');
  • function ybm_add_googleanalytics() { ?>
  • // Paste your Google Analytics tracking code from Step 4 here
  • <?php } ?>

Viewing Reports on the Google Analytics Website

Google Analytics can show you a treasure trove of data gleaned from your stats. You can view this information by going to your Google Analytics dashboard.

The built-in Google Analytics reports will be visible in the left column. Each section is divided into tabs, and clicking on a tab expands it to reveal more options.

  • Real-time This report will provide you with a live view of your traffic.
  • The Audience tab will display reports to help you better understand your users.
  • Acquisition reports delve into the origins of your users.
  • Behavior reports summarize what your visitors do once they arrive at your website.
  • Conversion reports show how well you’re doing in relation to your objectives.


How to Get the Most Out of Google Analytics

Google Analytics is a tremendously powerful tool with a plethora of fantastic features. Some are obvious and simple to use, while others require some additional setup.

Google Analytics works best when combined with Google Search Console (formerly Google Webmaster Tools). It shows you how your website is performing in search results.

We hope this article was useful in teaching you how to install Google Analytics in WordPress.

If you liked this post, please find and follow us on InstagramTwitter and Facebook.