Categories: HOW TO

How to Add Google Analytics to WordPress (Beginners Guide) 2021

When it comes to making a website, WordPress is the most popular site for bloggers and people around the world. The best part about WordPress is that it is user-friendly and flexible. If you have a WordPress site then you can easily install many widgets on the site, as the installation is simple and quick.

However, one of the major blogging mistakes that most newbie bloggers and website owners make is not using Google Analytics to track website traffic. Since the success of any website is determined by its traffic and stats, if you aim to monetize your site and want to keep a check on regular stats and updates, then you need to add Google Analytics to your website.

For any website, User engagement does play an important role. For this reason, it’s important to install Google Analytics for WordPress site as it gives you a fairly accurate web traffic and statistics reports.

In the below WordPress Google Analytics guide, we’ll take a look at how to add Google Analytics in WordPress without plugins and plugins. We’ll also look at how to get Google Analytics code and how to add Google Analytics code in WordPress.

So, let’s begin!

How to Add Google Analytics to WordPress With a Plugin and Without a Plugin?

Google Analytics is one of the best tools that help you track your site’s traffic. If you have a WordPress website, then it is important to add Google Analytics to WordPress. Thus, to this end, here is a comprehensive Google Analytics WordPress guide, that’ll show you exactly how to install Google Analytics in WordPress with a plugin and without one. Read now!

A. Importance of Google Analytics for WordPress Website

No matter what purpose you are using WordPress for - blogging, eCommerce, small business or any other online businesses - it is important to understand your site's visitor base. Where your potential readers or customers come from? What type of content do they really enjoy so that you can improvise on your content? What is the best time to publish new content?

For all this, Google Analytics really comes handy. It not only explains the site's analytics but also lets you know about visitor's interaction and tracking. After installing WordPress, activating the Google Analytics plugin is a must. The best part is you can add Google Analytics to WordPress for free.

B. How Google Analytics Works?

Google Analytics is a JavaScript code that you need to install in your WordPress site. It lets you know about the performance of your website such as;

  • When someone visits your website, the person is tracked by a tracking code and the said session on the website begins. The tracking code is installed on every page of the WordPress website.
  • It is one of the best tools to track website traffic and overall site analytics. You can know about sessions and page views by adding Google Analytics plugin.
  • It lets you know about the bounce rate and traffic source. Traffic source gives you a clear picture of site visitors. It can be a source from a website, search engine or even social media. This will help you improve your site’s on-page SEO.
  • By adding Google Analytics, you can know about session duration and pages per session. Google Analytics plugin can also help you to know about conversion rates and stipulated time on the website.
  • You can add Google Analytics to WordPress to know about interaction and visits. It also helps you optimize Google Ads performance.

C. How to Install Google Analytics in WordPress for Beginners

1. Create a Google Analytics Account

To add Google Analytics in WordPress, you need to, first, sign up for a Google Analytics account. Read this quick article to know how to create a Google Analytics account.

2. Integrate WordPress Site to Google Analytics

Integrating the WordPress website and Google Analytics is easy but you need to follow some simple steps.

  • You need to add Google Analytics tracking code to your WordPress website. But, editing the code on your WordPress is not simple. If you are familiar with the technical code and HTML language, you would be able to do this.Or you can follow an easier way and use WordPress Google Analytics plugins – MonsterInsights or Insert Headers and Footers plugin.
  • You have two options while adding from the plugin – one for mobile and another for the website. For WordPress, you need to select the website option.
  • Once done, enter the account name and profile of the website. You also need to enter website name, URL and country time zone.
  • Once you enter this information, you will get to the tracking ID button. On the Google Analytics server page, click on ‘I agree’ button to add WordPress Google Analytics to your website.

3. The Tracking Code

You will receive the Google Analytics tracking code for your WordPress website. You need to copy the tracking code and enter it on your website. Keep the tab open to install the WordPress Google Analytics code for your reference. The code is ready to be used on your WordPress website.

D. 3 Ways to Install Google Analytics in WordPress

1. Adding Google Analytics to WordPress through MonsterInsights

MonsterInsights is a very famous Google Analytics plugin for WordPress. More than 1 million websites use this plugin for analyzing traffic and data. If you are a beginner, then you can add this Google Analytics plugin to WordPress in easy steps. This plugin is available in the paid and free version.

The advanced paid version provides easy access to ads tracking, author tracking and eCommerce tracking. So, if you have a professional WordPress website, then you can use the paid Google Analytics plugin for your site.

  • Step 1: Start with installing the MonsterInsights plugin. Once you activate the plugin, it will add a new menu to your WordPress website. You can find it under insights in WordPress menu. Now, visit the site’s settings to configure plugin settings under insight.
  • Step 2: Click authenticate with Google account under this feature. This will help to integrate your WordPress website to the Google Analytics plugin. It will redirect you to the Gmail account if you have already signed into your account. You just need to click the Next button to access the Google Analytics plugin to your WordPress. Also, click the allow button on the site.
  • Step 3: Next, you can select a particular profile on information that you want to track. Also, select your website to complete the whole authentication process to install Google Analytics. Pick a profile and you will be redirected to your WordPress website.

    The site will show stats after some time as you cannot expect immediate results for tracking.MonsterInsights Google Analytics plugin lets you view your traffic report under the WordPress dashboard. So, you don’t have to leave your page or site.

    You can track this under the reports page for analytics data of your website. This Google Analytics plugin also gives you an option of tracking tab. You can opt for customized track settings based on your need. It’s the best Google Analytics plugin for WordPress and also the most popular one. The premium plugin offers you many more features.

2. Insert Headers and Footers Plugin

You can use this as a secondary method, but, there is no advanced tracking configuration feature in this. This method does not let you view your data in the WordPress dashboard. This can be time-consuming as well. Still, you can make use of the Insert Headers and Footers plugin.

  • Step 1: Install the plugin and activate it.
  • Step 2: Once you activate it, you need to visit your WordPress dashboard. Go to settings and install headers and footers page. You need to paste the Google Analytics code in this section. Paste it in scripts in the header section.
  • Step 3: After you paste, you need to click on ‘Save changes’ option as well.

The code part is not so difficult; you just need to use a proper format for installation. It’s indeed the best and quickest way to add Google Analytics to your WordPress site.

3. Install Google Analytics in Theme

If you want to add Google Analytics to WordPress without plugins, then follow this method. This method is a bit technical so it is for advanced users. But, you can also try as a beginner. The only glitch with this method is the code that you install can disappear if you change the theme of your website.

  • You can add the code in the header.php file. You just need to edit the header.php file in your WordPress theme and paste the code you copy after the tag. When done, you need to save the changes and upload the file back to the server.
  • You can add the Google Analytics tracking code via the functions file. This adds the code to every page of your WordPress so you can track traffic and other stats in an easy way. You need to add the below code to theme’s functions.php file.

#Getting Accurate Data Is Important

By adding Google Analytics to the WordPress website, you can get complete stats on traffic and data collection. You can view the whole data on Google Analytics dashboard and improvise on the traffic of your website.

Each section of the Google Analytics report is divided based on different tabs;

  • The audience tab will help you to know about your user’s interest.
  • The behaviour tab lets you know about the activity on your website.
  • The location lets you know about the place.
  • The conversion report lets you know about your goals and things you need to consider for your website.

One of the best ways to improve your site’s ranking & traffic right from the start is to invest in a good domain name and top 10 hosting company in India. This will ensure that your target audience is able to find your site easily and that your site is performing optimally at all times. To this end, check out this BigRock review to know why BigRock is the best web hosting provider in India.

Following this, if you are looking for a new web hosting provider or want to switch to BigRock hosting, then here are a few BigRock domain coupons and BigRock coupon that you can make use of to get a huge discount on your purchase.

#Conclusion

Not having or reviewing Google Analytics is one of the SEO mistakes that can cost you dearly. Google Analytics for WordPress is the easiest way to analyze your site’s traffic and be up-to-date on the current reports on your site’s performance. The data in the report helps you to know about user engagement and bridges the gap between user and site. Once you have this data, you can take better decisions to improve your site’s traffic.

MonsterInsights is the best Google Analytics WordPress plugin. It's important to add this plugin if you want to make your site successful. After all, it’s all about traffic and user engagement.

Lastly, if you are searching for an alternative to BigRock, then DreamHost is a good choice as it offers high-quality hosting at an affordable price tag along with DreamHost coupon.

Was this guide on how to add Google Analytics in WordPress helpful? Let us know in the comment below!

Leave a Reply

Your email address will not be published. Required fields are marked*

The field is required.