How to Install Google Analytics to WordPress with or without Plugin in 2019

How to Add Google Analytics to WordPress Website without Plugin

Share this Article

 

Google Analytics is used for measuring the traffic. We will tell you about How to Add Google Analytics to WordPress with or without Plugin. If you install more plugins that it slows down the website speed. So use this method and install Google Analytics in 1 minute.

What is Google Analytics?

Google Analytics is a freemium web analytics tool provided by Google to track the website traffic and website report.  This tool is made for the Search Engine Optimization and Marketing purpose.

 

Add Google Analytics to WordPress without Plugin
How to Add Google Analytics to WordPress without Plugin

 

It is developed by Urchin Software and Google bought it in 2005 from Urchin Software. You should use the Analytics tool to measure your website traffic and get the reports. Google Analytics is important On Page SEO factor.

How to Add Google Analytics to WordPress without Plugin in 2019: 7 Steps to Follow

Step 1: Sign up for Google Analytics. Create a Gmail Id because these are the Google’s Product. Gmail Id is much needed.  Search with analytics.google.com. 

 

How to Add Google Analytics to WordPress Website

 

Step2:  Click Sign-up with Gmail Id and Password.

 

How to Add Google Analytics to WordPress Website

 

 

Step 3: After Sign-up you can track your website or App here. Here you will add Website Name, URL, Category of your website, Reporting time zone. In website URL, you will add URL without HTTP or HTTPS.

 

How to Add Google Analytics to WordPress Website

 

Step 4: Click on Get Tracking ID. Google Analytics gives you the Javascript Code. You will copy this code and Paste in your website. The JavaScript code is like this.

 

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

gtag(‘config’, ‘UA-123456789-1’);
</script>

 

Note: If you have lost this code during verification then you will go in Admin section. You will go to Property.  In Property, you will see Tracking Info. Tracking Code is available in Tracking Info.

Step 5:  When will you get the tracking code from Google Analytics then you will go to your WordPress Website. Go to Appearance and you will see the Editor.

 

How to Add Google Analytics to WordPress Website

 

Step 6: Go to the header.php file. You can find this file in the right section where the themes files are available.

Step 7: So paste your Analytics Javascript code between the <head></head> otherwise paste the Javascript code before </body>.

Example: 

<head>

<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=UA-123456789-1″></script>

<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());

gtag(‘config’, ‘UA-123456789-1’);
</script>

</head>

How to Add Google Analytics through analyticstracking.php?

Step 1: Copy the Javascript code and Create the file analyticstracking.php. Paste Javascript code in this file and save this file.

Step 2: Upload this file to the root directory (public_html)  of the website.

Step3: Add <?phpinclude_once(“analyticstracking.php”) ?> after <body> tag. The <body> tag will be find in header.php file in WordPress.

Your code is added to the website and after adding the code you can test through Google Analytics.

Example: if you type the website URL like this www.ellisonhub.com then you will see 1 visitor in Real-time report or Main Dashboard of Analytics of your website.

 

How to Add Google Analytics Code in WordPress without Plugin

 

Note: If you want to open your desired website report then Go to Accounts> Property>Views. It will open all the reports.

So, these are the methods, How to Add Google Analytics Code in WordPress Without Plugin. Use these methods and measure your website traffic after installation.

How to Install Google Analytics on WordPress through Plugin?

Step 1: Install Google Analytics for WP Dashboard Plugin. This is the best and easy to use plugins in WordPress.

 

Google Analytics Dashboard for WordPress
Google Analytics Dashboard for WordPress

 

Step 2: After Installation, Activate this plugin.

Step 3: Go to General Settings in this plugin. Go to Plugin Authorization.

 

GADWP

 

Step 4: Click Authorization Plugin.

Step 5: After this, it will ask for Access Code.

 

GADWP 1
GADWP 1

 

Step 6: Click on red Get Access Code. After this, it will redirect you to your Gmail Id.

Step 7: Login with Your Gmail Id. Allow Access to your Gmail Id.

Step 8: It will give you Access Code and Paste the Access Code into WordPress.

Step 9: After pasting the code then Save Access Code.

Step 10: After this, it will show your dashboard like this.

 

Google Analytics Dashboard
Google Analytics Dashboard

 

Step 11: Click Lock Selection and Save Changes then your website. It will show your complete Analytics data.

Dashboard

 

Step 12: If you want to see your website analytics then go to Dashboard of your website. It will see your website complete analytics.

 

Google Analytics Dashboard

 

So these are the steps for How to Add Google Analytics to WordPress with the help of Plugins.

Conclusion:

By this blog, you have learned How to Add Google Analytics to WordPress with or without Plugins in 2019. Apply any method of adding the code. The first method is comparatively easy for the second method. Analytics is necessary for SEO prospects. So use these methods and add Google Analytics early if you have not added.

if you have liked this article then like our Facebook Page to get more relevant content regarding Digital Marketing, WordPress.

Read this:

12 Best Free WordPress Plugins Every Digital Marketer Should Use (2018) 

A Step by Step Guide to SEO Checklist 2019

 

 

Share this Article

Summary
Review Date
Reviewed Item
Ellison-Hub
Author Rating
51star1star1star1star1star

Author: Vishal Tyagi

I am a Digital Marketer, SEO Professional and Blogger. In this blog, We will tell you about SEO, WordPress, Facebook, Social Media, Blogger Platform.