15 December 2017
Home / Wordpress / How To Install Google Analytics On Your WordPress Website

How To Install Google Analytics On Your WordPress Website

How To Install Google Analytics On Your WordPress Website

Hi Buddies! Welcome back!! So now that you have launched your WordPress website and you think it’s time to know how people interact with your website and are eager to install Google analytics on your WordPress website.

 

 

Please read further as I guide you to set up google analytics account, the most popular website tracking and analytics tool for your WordPress website and also provide answers to all your questions like “how to use google analytics on website”.

 

So What Is Google Analytics All About?  

    

Google Analytics is one the most popular and widely used website tracking and analytical tool used by every personal and business website owner to track user behavior and generate detailed reports on the:

  • Traffic generated
  • Traffic source
  • Type of audience
  • How they interact and overall performance of the website etc.

 

No other tool has come close in tracking user behavior like Google Analytics, as you can use these important user data to take very important decisions for the betterment of your website and your business simultaneously.

 

Why Is Google Analytics Important for Your WordPress Website?

 

Starting your own website means you wish to accomplish some goals, like creating a blog, to talk about your passion or to start an eCommerce store to sell your products online or just to create a personal website about yourself.

 

But whatever your goal is, you need to understand what kind of user’s visit your website and what are the traffic sources that drive them to your website, how long one stays on your website and which is the page that is popular or what product is being viewed the most.

 

 

Without this information on your hands, you could never envisage what is ahead of you and move your website to the next level.

 

Google Analytics is one tool that every webmaster would dream of as it provides all of this data for free. All it takes is an hour of your time to install WordPress onto your website, and you will enjoy the features provided by Google Analytics.

 

Installing Google Analytics on your WordPress Website

 

Now you’ve understood what Google Analytics is all about and how it could be beneficial to your website, it’s time to see how to add Google Analytics to your website.

 

You need a Google Account if you want to add Google Analytics to your website. Go here to create one.

 

 

Once you’ve created your new Google account, please click here to go to the Google Analytics page and login to your account and fill all the information that is needed to set up analytics.

 

Once you are done with setting up your Analytics account, copy the tracking code as shown in the picture below:

 

How To Install Google Analytics On Your WordPress Website

               

You can install Google Analytics on your website in several ways.

 

Method 1: Manually add by editing header.php file

 

This is a no-nonsense method, but involves some basic knowledge about WordPress and how to edit pages in WordPress.

 

  • Now login to your WordPress admin and go to Appearance -> Editor to launch the editor window.

 

Google Analytics on your website

 

  • At the right of the editor, you can see the list of file names, select click header.php,

 

Installing Google Analytics on your WordPress Website

 

  • Now search for the tag </head> in the header.php code and paste the tracking code you copied from the Google Analytics website before the tag </head> like this:

 

Google Analytics

 

  • Click the “Update File” button to complete the process and go back to the Google Analytics page where you copied the tracking code. You can check the status by clicking “Send Test Traffic” button. It normally takes minimum 24 hrs to see some actual data and later you can click the “Reporting” link in the main menu to see all your analytics reports.

 

Method 2: Add Using a WordPress Plugin

 

Even though there are many plugins available to add Google Analytics to your WordPress website, the Google Analytics plugin by MonsterInsights is one of the best option. MonsterInsights was formerly known as Yoast.

 

  • Go to the download link and download the latest version of the plugin.

 

Google Analytics plugin by MonsterInsights

 

  • Now login to your WordPress Admin section and go to the “Plugins” section and click “Add New”, this will open a window where you need to select the location of the downloaded plugin file and installation will start automatically.

 

Why Is Google Analytics Important for Your WordPress Website

 

  • Next, you need to activate the plugin and visit the Google Analytics authentication page.
  • There you need to copy the authentication code and paste in the specified field marked there.
  • You can also see a detailed manual here on how to install Google Analytics plugin
  • Now Click Authenticate and that’s it, your google analytics is up and running.

 

Method 3: Manually add by editing functions.php file

 

Another method to setup Google Analytics is by editing the functions.php, instead of the header.php. But here, you need to add a small snippet of code to the functions.php.

 

  • Login to your WordPress admin section
  • Go to Appearance -> Editor
  • And select the functions.php file
  • And add the following code specified below:

 

<?php add_action(‘wp_head’, ‘add_google_analytics’);
function add_google_analytics() { ?>
// Paste your Google Analytics code here
<?php } ?>

 

  • In the area where it says, “Paste your google Analytics code (remember you’ve copied the tracking code) just paste the tracking code here and click update file.
  • That’s it you are done setting up google Analytics tracking to your website

 

Conclusion

 

All the methods that are described above should work seamlessly if you follow the guidelines properly. Whatever method you choose, please make sure to verify again that every step has been implemented correctly and verify it again by visiting and logging into your Google Analytics account to see if you can see any data is being gathered.

 

 

If you still want to know, whether you really need Google Analytics, please go through the following link to learn more about it.

 

To get more such articles directly to your mailbox Subscribe to eMoneyIndeed now.

 

We hope you found this article useful and informative as always. Do leave your valuable comments below and don’t forget to share this article with your friends.

 

Installing Google Analytics on your WordPress Website

Gaurav Jain
Article by Gaurav Jain
Hey There! My name is Gaurav Jain, a full time affiliate marketer since 2007. The reason for starting eMoneyIndeed.Com blog is to help you Save & Make Money Online. I write about Blogging, Online Marketing, Webhosting, SEO, Affiliate Marketing, Startups, Social Media, Email Marketing and more. Hope you enjoy the posts on eMoneyIndeed.com

Want To Earn Money Online?

Get Tips & Tricks in Your Mailbox
Subscribe Below
Join lot's of other subscribers:
Making money is a hobby that will complement any other hobbies you have. Stop wishing - Start doing. The goal is living life on your terms.
SUBSCRIBE

Check Also

How to Embed and AutoPlay Facebook Videos in WordPress Blog

How to Embed and AutoPlay Facebook Videos in WordPress Blog

People who are active on Facebook could’ve noticed that videos posted on Facebook start playing …

One comment

  1. very good article sir

Leave a Reply

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

Want To Earn Money Online?

Get Tips & Tricks in Your Mailbox
Subscribe Below
Join lot's of other subscribers:
Making money is a hobby that will complement any other hobbies you have. Stop wishing - Start doing. The goal is living life on your terms.
SUBSCRIBE
Want to Learn Tons of Ways to Make Extra Money From Home?
Show Me How

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join lot's of other subscribers
SUBSCRIBE