You are currently viewing How To Add Google Analytics in WordPress in 2020 & After

How To Add Google Analytics in WordPress in 2020 & After

In this article, you will be learning How to add google analytics in WordPress sites with ease.
Google Analytics plays a very important part for a website from where you can generate traffic reports and access most valuable information of website visitors.

Google analytics is a free tool offered by Google, we can use it not only in WordPress but it is compatible for all the platforms.

after setting up your Google Analytics account and start analyzing your visitors.

INSERTING YOUR GOOGLE TRACKING CODE WE HAVE 2 METHODS

We have covered two methods, so that you can choose your OWN WAY to add analytics in your website.

You have a couple methods for How to add google analytics to wordpress into your WordPress theme — through plugin or through the theme’s “header.php” file. 
Inserting the google tracking code directly into your theme’s “header.php” file is fast and easy.

Using the help of a plugin to insert the google tracking code is the second method which is a little time consuming.

Would you simply paste the code using a plugin? If yes then follow this procedure.

OPTION 1:
INSERT HEADERS AND FOOTERS SCRIPTS:
If you are using WordPress sites then you must want to add some code for affiliate or tracking purposes but are somehow scared to do so.
Well, this plugin is the best solution for you.

Whatever code you want to add in your “header.php” file, this plugin does automatically.
This applies the tracking code to all pages of your site without a fuss.

First you have to, install and activate the plugin.
Go to the WP Dashboard > Click Plugins > search for “Insert Headers and Footers Script > click the “Install” button > and then click the “Activate” button.

FOLLOW THESE INSTRUCTIONS:
1. Go to WP Dashboard > Hover Settings > Click Insert Headers and Footers.

2. Copy your Google Analytics tracking code and paste it into the field named “Scripts in Header“.

3. Click the “Save Changes” button.
It’s that easy!
How to Add Google Analytics to WordPress with a Plugin

Would you simply paste the code into the theme file by yourself? If yes then follow this procedure.

OPTION 2:
INSERT CODE MANUALLY IN “HEADER.PHP” FILE

STEPS FOR MANUALLY ADDING CODE:
Go to WP Dashboard >Hover on Appearance > Click the Theme Editor Option > and open the file named “header.php” from the options available on the right side.

Toward the top of the code, look for the bit of code that looks like ““.

Now carefully add the code in the head section of the file without disturbing the existing code.

You can either place the code ABOVE of this or at the END of this , I will suggest you to paste the Google Analytics tracking code at the end but leave a blank line before pasting the code..
How To Add Google Analytics to WordPress Site Manually ​

Save changes to the file when finished.

REMEMBER! Using this method of manually inserting the tracking code within your “header.php” file is fast and effective, though you’ll need to re-do this step if you ever change WordPress themes or update your theme.

For practical understanding see our video “How to add google analytics in WordPress” through plugin or manually.

The Benefits of Using Google Analytics in WordPress

Now you know how to add google analytics code in WordPress.
Once you have installed google analytics in your wordpress site, you will be able to uncover information about your website and its visitors. This includes through which platform users find your website, which page landed and from which page they exist, what your most popular blog or page is, and a whole lot more.
Follow the benefits:

  1. More information about your website – The first advantage of using google analytics is you can get so much information about your user that you can’t even imagine.

You can know the age and of the users, different countries of the users, source of users, which page/blog has maximum traffic, which mobile network your visitors are using, what kind of device they use like mobile, tablet and laptop etc.

So, this is one of the strong reasons to use google analytics.

  1. From which traffic source you get most users – You can full detailed information about the source of your traffic.

There are 5 sources of traffic: Direct, organic, social, referral and others.

Now you can see which source of traffic is highest, what is the bounce of rate of that source,  how much conversion you got from each source etc.

  1. You can know what users are searching on your website – There is one feature on Google analytics which you once turn it ON, helps you can get information on “what your users are searching on your website”. This feature’s name is “Site Search”.

Isn’t it cool!

  1. Improve the Bounce Rate of Your Website – Suppose, you have not installed google analytics on your website.

Now what happens, you don’t have any information about your users. Right?

Due to which, you won’t be able to take steps to improve your bounce rate.

  1. You can track conversions – Google analytics give you one more awesome thing.

You can track your conversions.

  1. Set up Goals – You can set up your own “Goals”. By setting up goals you can track your objectives.

There are four types of goals in google analytics:

  • Destination
  • Duration 
  • Pages/Screens per session and
  • Event

Below are just some of the features offered by this tool.
Demographics – In this report you can get information on two things:

(a) Age – Get information on how old your users are.

(b) Gender – Get information on which traffic is more on your website male’s or female’s.

Geo – In this report you can get information on two things:

(a) Language – Information on language settings in your users’ browsers and

(b) Location – The country from which the session raised.

Channels – Get information about the sources of your traffic. Now channels are grouped into 5 categories:

(a) Direct

(b) Organic

(c) Social 

(d) Referral

(e)  Others

For example, Some famous websites like H&M, Zara, Adidas etc have higher chances of direct traffic. Why?

Because they are popular and well known by everyone.

Bounce Rate – It means when a user comes to a website and has no interaction.

Simply putting, it is a one page session.

How To Add Google Analytics Code in WordPress: Conclusion

That’s it!

You have just learned how to add Google Analytics to WordPress without a plugin and through manually.

I think we have solved your “where to add google analytics code wordpress” question in an easier way.

You can use any method which you think is suitable for you.

I hope you like our new article How to add google analytics in WordPress.

If you have any doubts or queries do mention it in the comments.

Don’t forget to share this article with your friends on LinkedIn and Facebook.

Summary
How To Add Google Analytics in WordPress in 2020 & After
Article Name
How To Add Google Analytics in WordPress in 2020 & After
Description
Google Analytics plays a very important part for a website from where you can generate traffic reports and access most valuable information of website visitors. Google analytics is a free tool offered by Google, we can use it not only in WordPress but it is compatible for all the platforms. In this article, you will be learning How to add google analytics in WordPress sites with ease. after setting up your Google Analytics account and start analyzing your visitors. We have covered two methods, so that you can choose your OWN WAY to add analytics in your website.
Author Name
Digiaaj
Digiaaj
https://digiaaj.com/wp-content/uploads/2019/05/Digiaaj.com_.png

Yugam Mehta

I am a certified digital marketer and I am sharing latest SEO, Search Engine and Internet Marketing News on my platform.

This Post Has 2 Comments

  1. Vera

    Hey there! Would you mind if I share your blog with
    my facebook group? There’s a lot of folks that I think would really appreciate your content.
    Please let me know. Thanks

Leave a Reply