by

How to Install Google Analytics in WordPress for Beginners

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

How to Install Google Analytics in WordPress for Beginners

How to Install Google Analytics in WordPress for Beginners Do you want to install Google Analytics in WordPress? Knowing how your audience interacts with your website is crucial for your success.

The best way to know your audience is through your traffic stats, and this is what Google Analytics provides for FREE.

In this article, we will share why Google Analytics is important, and how you can easily install Google Analytics in your WordPress website (step by step).

First, we will explain why Google Analytics is important and how it can help you grow your website.

After that, we will show you how to sign up for a Google Analytics account and different methods to install it on your WordPress site.

Finally, we will explain how to view your traffic reports in Google Analytics.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Step 2: Once you sign-in with your Gmail account, you will be prompted to a screen like the one below. This is where you will signup for Google analytics with your Gmail account.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

After that, you will be asked to provide an account name. This name will be used internally so you can use anything like your business name.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Step 3: On the next screen, you will be given choice to choose between a website or mobile app. Make sure you select website.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

After that, you need to enter website name, website’s URL, country, and the time zone.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Once you have entered this information, click on the Next button. You will be presented with Google Analytics terms and service which you must agree to, so click on ‘I Agree’ button.

Step 4: Now you will be presented with your Google Analytics tracking code. You can copy this tracking code because you will need to enter it in your WordPress site depending on the method you use below.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

We suggest leaving 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 have setup a Google Analytics account, let’s take a look at how to install Google Analytics in WordPress.

How to Install Google Analytics in WordPress
There are a few different ways to setup Google Analytics in WordPress. We will show you three methods where the first option is the easiest and the last being the hardest.

You can choose the one that best suits your needs.

  1. Google Analytics for WordPress by MonsterInsights
    MonsterInsights is the most popular Google Analytics plugin for WordPress. Over 1 million websites use it including the likes of Bloomberg, PlayStation, Zillow, and more.

It is the easiest and by far the best way to add Google Analytics to WordPress (for all users beginners and experts alike).

MonsterInsights is available as both, a paid premium plugin, and a free version. In this tutorial, we will be using the MonsterInsights free version.

You can use the MonsterInsights Pro version if you want more advanced features like E-commerce tracking, Ads tracking, Author tracking, etc. The process of setting them up is the same.

Let’s get started.

The first thing you need to do is install and activate the MonsterInsights plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will add a new menu item labeled ‘Insights’ to your WordPress admin menu. Clicking on it will bring the MonsterInsights setup wizard.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

First, you will be asked to choose a category for your website (a business website, blog, or online store). Select one and then click on ‘Save and Continue’ button.

Next, you need to click on the ‘Connect MonsterInsights’ button.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

This will bring up a popup that will take you Google accounts where you will be asked to sign in or select a Google account if you are already signed in.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Next, you will be asked to allow MonsterInsights to access your Google Analytics account.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Click on the ‘Allow’ button to continue.

The final step is to select the profile you want to track. You need to select your website here and then click on the ‘Complete authentication’ button to continue.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

MonsterInsights will now install Google Analytics on your website. After that you will be asked to select the recommended settings for your website.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

The default settings would work for most websites. If you use an affiliate link plugin, then you need to add the path you use to cloak affiliate links. This will allow you to track your affiliate links in Google Analytics.

Click on the Save and Continue button to save your settings.

Next, MonsterInsights will show you paid add-ons that you can access if you upgrade to PRO. You can simply click on the ‘Save and Continue’ button to skip this step.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

After that, you will be asked to install WPForms plugin, which is the best WordPress contact form plugin. You can install it or simply click on ‘Skip this Step’

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

That’s all you have successfully installed and setup Google Analytics on your WordPress site. Remember, it will take Google Analytics sometime before showing your stats.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

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

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Note: MonsterInsights was formerly known as Google Analytics for WordPress by Yoast. WPBeginner’s founder, Syed Balkhi, acquired the plugin in 2016 and rebranded it to MonsterInsights. Now it is part of our family of premium WordPress plugins.

  1. Insert Headers and Footers Plugin
    This method is not as not as good as MonsterInsights because you will not be able to do advanced tracking configuration, and you will not be able to view Google Analytics data in your WordPress dashboard.

First, you need to install and activate the Insert Headers and Footers plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics code that you copied in step 4 into the headers section

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

Don’t forget to click on the save changes button to store your settings.

That’s all, you have successfully installed Google Analytics on your site.

  1. Install Google Analytics in WordPress Theme
    This method is for advanced users who are familiar with the code. It is somewhat unreliable because your code will disappear if you switch or update the theme. We almost never recommend using this method.

If this is your first time adding code to your WordPress files, then you should check out our guide on how to copy paste code snippets in WordPress.

Add code in header.php file

Simply edit the header.php file in your WordPress theme and paste the code you copied in step 4 right after the tag.

Don’t forget to save your changes and upload the file back to your server.

Add via Functions File

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

You will need to add this code to your theme’s functions.php file.


<?php

add_action('wp_head', 'wpb_add_googleanalytics');

functionwpb_add_googleanalytics() { ?>

// Paste your Google Analytics code from Step 4 here

<?php } ?>

// Paste your Google Analytics code from Step 4 here


Viewing Reports on Google Analytics Website
Google Analytics is capable of showing you a treasure of data collected from your stats. You can view this data by visiting your Google Analytics dashboard.

How to Install Google Analytics in WordPress for Beginners
How to Install Google Analytics in WordPress for Beginners

You will see the built-in Google Analytics reports in the left column. Each section is divided into different tabs and clicking on a tab will expand it to show more options.

Real-time This report will show you a real time view of your traffic.
Audience tab will show reports to help you understand your users.
Acquisition reports explore where your users came from.
Behavior reports summarize what your users do after they arrive on your site.
Conversion reports show how well you’re doing against your goals.
Making the Most out of Google Analytics
Google Analytics is an incredibly powerful tool with tons of awesome features. Some of them are quite obvious and easy to use, others require some additional setup.

Here are some of the resources that will help you make the most out of Google Analytics reports.

Track user engagement in WordPress with Google Analytics
Track Woo-commerce customers in Google Analytics
Track outbound links in WordPress
Google Analytics works best with Google Search Console (formerly Google Webmaster Tools). It allows you to see how your website is doing in search results. See our complete Google Search Console guide to learn how to use it to grow your website.

click for follow us on Facebook wiki reviews always be updated, get new Tutorial on time

Comment

Leave a Reply

1 comment

News Feed