How to Add the Google Analytics to Your Website in 2020(Without Install Plugin)

how to add google analytics to website

In order to monitor your website performance well or not, you need to add the google analytics to your WordPress website, this is a free tool of Google, it will collect many data of your website performance, included how many visitors have come to your website and how many pages did they see and how much duration time did they stay in your website, which post and what content is welcome and liked by your readers or audience.

In this guide, you will learn how to add google analytics to your website and use the collected data to optimize your website and get more traffic and visitors.

OK, let’s jump into the operation steps.

Step #1 login to the Google Analytics account and create a tracking ID and copy the tracking code.

First, login your Google Account, if you have no account your can resgister one use your phone number.

login google account

Second, after you log in to the Google Analytics account you need to do three steps setup and create your Google Analytics account as below image shows.

After you click the create button you will get the tracking ID as below image shows.

After creating the account you will get tracking ID you need to copy the Global Site Tag(gtag.js) and insert it to your website.

window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, ‘UA-164129668-1’);

Step #2 Copy the tracking ID and insert to you website theme header

Login to your WordPress website dashboard, find the Appearance>>theme editor>>header.php, then you will see the code on the header.php file left side as below images shows. find the <?php_wp_header(); ?> and paste tracking code between head tag. and then click the update file button. Here you have finished adding the google analytics to your website.

paste google tracking code.

Steps 3# Check if the Google Analytics installed Correct and works

After you paste tracking code to the website then you can login to the Google Analytics account and on the same time, you can visit your website and you will see a one visitor online as below image shows.

Above method was add the Google analytics without install plugin in your WordPress website. There are many other methods also works such as install Google Analytics plugin and monsterinsight plugin as well.


Leave a Reply

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