If you can copy and paste text, you can install Google Analytics in WordPress.
Why you wanna install google analytics in WordPress website????
It’s important to understand how your audience interacts with your website and the best way to do this is with Google Analytics.
Google Analytics not only lets you measures your sales and conversions, but also gives you insights into how visitors use your site, how they arrived on your site, and how you can keep them coming back.
Knowing how your audience interacts with your website is crucial for your success.
The best way to know your audience is through your traffic stats and this is what Google Analytics provide for FREE.
In this blog post, we will share why Google Analytics is important, and how you can install Google Analytics in WordPress website.
It doesn’t matter if you have a WordPress website with 100 views a day or a blog with 100 millions views a day, you need to have a stats program which help you to track traffic and analyse them.
In this tutorial, you will be learning about setting up your Google analytics account. Also, you will see how to install Google Analytics in WordPress website.
Rest assured! This guide is very easy to follow to non-technical users too, so you don’t have to worry about tech-how of Google analytics & WordPress integration.
We’ll explore why Google Analytics has become the industry for analysing website traffic, and how you can use it with your website.
All you need is an established self-hosted WordPress.org website or blog and a Google Analytics account.
If you first need help setting up WordPress website then you can refer this: “3 steps to Create a WordPress website with your own Domain“
Why is it important to install Google Analytics in WordPress website?
Google analytics allow you to keep track of:
Who visits your site
What they do when they are on your website
You can track where the user is going on your website, how long do they stay on your website, and what is the bounce rate (the percent of users exit your site on the first visit).
When they visit your website
By looking at the hottest hours in the day for your site, you can pick the time when you publish your post.
Where did they arrive on your website from
This section of the analytics show you where did the user come from (for example: Search Engines, Direct Links, Referral links from another site).
How they interact with your site’s content
Google analytics show how your users interacted with your site’s content. It shows you what percent of the user clicked on which link on your site and much more.
How to Setup and install Google Analytics in WordPress Website
You can repeat this same process for any website.
If you are doing this for your first website, you need to go to Google analytics page and login using your Google account or create an account which is free.
For the first time setup, you will be asked to add your website details and your personal details to get started.
If you are someone who already have an account, click on admin tab at the top > select account and click on add new property.
On the next page you need to add your website details to get the tracking code. Here is a sample screenshot from one website:
Once you are done entering your details, just click on Get Tracking ID in the blue button as below:
Click on Get tracking ID and you will be moved to the page with tracking ID for your website where you will see something like the image below:
So far you have successfully setup your Google analytics account and created the tracking ID for your website.
Now the most interesting part of this tutorial begins; as you need to integrate and install Google analytics in WordPress website. Let’s have a look at it into next section.
There are various ways in which you can install Google Analytics in WordPress.
— Adding Tracking Code in Header.php and footer.php file
— Adding Google Analytics Using Functions.php
— Adding Tracking Code Using Third Party Plugins
Let’s put it in the below format:
3 ways to install Google Analytics in WordPress Website
There are multiple ways to install Google analytics in WordPress, and depending upon your level of blogging you should pick one of the below mentioned methods.
1.) WordPress Theme >>
Many of you might not beware of the fact that most of the WordPress theme have an option to add header and footer script.
You can use this to add GA tacking code into your blog.
Simply copy the tracking code which you obtained above, and go to theme setting option, look for option to add footer script and paste the code.
It will work seamlessly and more over you don’t have to rely on another plugin for simple task.
2.) Google Tag Manager GTM >>
Google tag manager (GTM) is one of the newest free product by Google to make life of a Webmaster easy.
Now, lets see this from a non technical point of view, what if you just got a new tag and you need to add it into your WordPress website, you have to edit the core theme file manually and add the code, and this may not be an easy option for many.
Google tag manager comes out as a solution for tag management from single web interface and you can quickly add and remove the tags at any time.
Along with it, using single tag for tag manager, speeds up the load time as Google loads code asynchronously, that means your Website will not be slow because of slow loading tags.
3.) WordPress Plugin >>
There are many plugins which are available in WordPress Plugin repo to install Google analytics in WordPress website, but Google Analytics plugin by Yoast is the best.
All you need to do is to install GA for WordPress plugin from official repo (plugin link) and configure it, which I have explained below.
Once you have activated the plugin, you will see a popup asking to allow or disallow tracking, which I prefer to select “Do not allow tracking”.
Go to settings > Google analytics to configure the plugin and click on click here to authenticate with Google or you can also select manually enter the UA code.
Click on save settings and you have successfully configured the plugin.
And that’s it! You’re done with the process of “How To Install Google Analytics in WordPress Website.”
Do let us know which method you are using to install Google analytics in WordPress and what other stats program you are using to track visitors on your blog.
Don’t forget to share this tutorial with your friends on Facebook and Twitter.