Build Beautiful WordPress Websites Using Divi and Divi Builder

How To Add Google Analytics On Your WordPress Website

Muneeb WordPress Tutorials Jan 13, 2021

Google Analytics is a one-stop solution for all the analytics of your website. Whether you want to run a marketing campaign or just want an in-depth analysis of your website's traffic, Google Analytics helps you with all of it.

For a business website, Google Analytics is a crucial tool to plan your content and shape your strategies according to the analysis given by the software. In this tutorial, we will help you set up Google Analytics for your website.

Setting Up Google Analytics

Setting Up Google Analytics is not too difficult while it goes through a series of certain steps that have been briefly explained below.

Creating an Analytics Account

First, you will need to create your Google Analytics and for that, you will need to go the Analytics Page and press Start For Free.

Download Divi The Best WordPress Theme

The Most Popular WordPress Theme In The World And The Ultimate WordPress Page Builder

Download Divi

Next, you will need to add your complete information to set up your account and set up a Property.

Property is your website or application from which the data will be collected and analyzed and then set up a reporting view for your property.

Hunting For Tracking Code

Once you have created your Google Analytics account you will need to find the tracking code from your Google Analytics Account by going to the Admin area and then Property and Tracking Code from the Tracking info tab.

Right beneath this, you will find a tracking code that you will need to copy. The code will look like this while you will have your Tracking ID instead.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date()); 
gtag('config', 'UA-XXXXXXXX-1');
</script>

Installing Google Analytics

There are more than one methods of installing Google Analytics on your WordPress while doing it through the plugin is the easiest and somewhat reliable way to do it.

For this tutorial, we will be using Google Analytics Dashboard Plugin to install Google Analytics on our WordPress website.

First, you will need to install and activate this plugin on your WordPress.

Setting Up The Plugin

Once you have downloaded and activated the plugin on your WordPress, it will be added in your dashboard menu as "Insights"

By clicking on the Insights, a setup wizard will open up on your screen.

You will need to choose for your website from the given categories and then press Save and Continue button.

For the next part, you will need to press Connect MonsterInsights to connect your website with your Analytics account.

You will be directed to a Gmail page where you will choose to sign in the account that you used for Google Analytics.

You will need to allow MonsterInsights to access your Google Analytics account.

After you have pressed the Allow button, you will need to pick the website you want to track and then press Complete Connection.

The plugin will now install Google Analytics to your WordPress. Next, you will be asked to choose the recommended tracking settings for your WordPress site. However, the default settings are good enough to work for most websites, you can make the changes that work for you.

Once you are done with the necessary adjustments, you can go ahead and press Save and Continue.

The plugin will then offer you a paid upgrade and another plugin, while you can skip both these steps to complete your setup.

The best thing about this plugin is that it offers you all the analysis of your website right on your Dashboard.

You can access the insights of your website by clicking on the insights button in the Dashboard Admin Bar.

Conclusion

Google Analytics is one of the best software to shape the growth of your website and analyse the content you are putting out for your users. Whether it is an e-commerce store or a blog, Google Analytics offers a variety of features.

Google Analytics works the best with Google search console. Make sure to check out our tutorial on that.

We hope you make the most out of this tutorial and grow your website. To stay connected for our further publications, try joining us on our Facebook and Twitter.

Share Your Thoughts