How to Add Google Analytics Code to Your Website?

Are you running a website? How to know the number of visitor’s/audience for your website? Which country visitors are coming from? Which keyword visitors are using to reach your website? I am sure; you must have many similar questions regarding visitors to your website. There is only one answer of your question and that is Google Analytics. However, many of us, does not know about Google’s analytics service. You must be thinking, what Google analytics is? and how it works for your website? How to add Google analytics code into website to know your audience? Do not worry; in this article, you will know all required information about Google analytics.

What is Google Analytics?

Google Analytics is a free web service provided by Google. It helps us to analyze website traffic and audience. Google launched this analytics service in 2005. It is a free web analytics tool by Google. You can easily track or monitor your visitor’s traffic source, location (by country), content, keywords, etc. Now days, the Google Analytics is the most used web analytics web service in the world. Now, you have a question in your mind, how it works for you? Add Google Analytics Code To Your Website Click To Tweet

Well, it is quite simple, just go to the Google Analytics Sign-in page and login with your credentials (Google user ID & password) and sign up for Google analytics with simple on-screen steps. Check the image given below. Sign up required some basic info about what site you would like to monitor. Then, you will get a tracking code to paste onto your pages so Google knows when your site is visited.

How to Get Google Analytics Tracking Code?

I hope that now you know what Google Analytics is and what is does. Once you have signed up for analytics with required basic information then, you have successfully created your website data. Now follow below steps to get the Google analytics tracking code: Add Google Analytics Code To Your Website Click To Tweet

Step 1. You need to access Analytics Admin panel. Navigate to the left bottom and click on “Settings” (gear icon).

Step 2. Under Admin settings, go to site property and click on “Tracking Info”. It will expand and will show you other options as well. Need to click on “Tracking Code”.

Step 3. Google Analytics will show you the Tracking ID and Website tracking code (global site tag, also known as gtag.js). Just need to copy the whole code.

Add Google Analytics Code to WordPress Website

In this tutorial, I will show you that how you can easily add Google analytics code to the WordPress website. However, there are so many WordPress plugins available to place the code to finish this task, but Google says; that you need to copy the analytics code and paste in the WordPress website Header. Adding Google analytics tracking code to the site header will make your page loading speed bit slowly because when any visitor come to your WordPress website, first, it loads tracking code and your page content. So, in my opinion, we need to place Google analytics code to the WordPress footer. There is no harm of adding analytics tracking code to the site footer. Add Google Analytics Code To Your Website Click To Tweet

Steps to Add Analytics Tracking Code to the Site Footer

Follow the steps given below to add Google analytics tracking code to the WordPress website footer:

Step 1. Open your WordPress site Admin Panel (http://example.com/wp-admin). From the left pane, navigate to “Appearance” -> “Editor

Step 2. Now from the right panel, click on “footer.php

how to add Google analytics code?

Step 3. Now scroll down the page to the bottom and paste Google analytics tracking code right before the </body> tag. Then, at last, click on “Update file” button to save the changes.

add Google analytics code

Once you have done the task that means you have successfully installed or added Google analytics tracking code to your WordPress website. Now go back to your Google analytics account and within next few minutes, it will show you the current number of visitors/audience on your WordPress site, if any.

add Google analytics code on wordpress

Apart, you can check the analytics reports with various parameters like- traffic source, location, content, events, etc. Once you will start navigating or playing to your analytics account, you will get to know many other benefits. Add Google Analytics Code To Your Website Click To Tweet

Share this post to help others!!

Leave a Reply