How To Add Google Analytics Code to Your WordPress Site – Step by Step for WordPress Beginners

how to add google analytics to your wordpress site

In this simple tutorial, tuturuan ko kayo pano magsetup ng Google Analytics sa inyong WordPress site.

I have simplified this guide to non-technical users too, so you don’t have to worry about tech-how of Google Analytics & WordPress integration.

How to Setup Google Analytics Account

Let’s start the guide with setting up a Google Analytics account for your WordPress blog. You can repeat the same process for any website too.

If you are doing this for your first website, you need to go to Google Analytics page and log in 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 has an account, click on Admin tab at the top > select account and click on add a new property.

Google analytics 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:

Click on Get Tracking ID and you will find your Google Analytics tracking code or script.

Depending upon the method we are using to put Google analytics code to WordPress, we may be using only tracking ID or the complete script. Basically, this is what will help us connect WordPress with Google analytics for tracking site visitors and more.

The next step is to put Google Analytics code in WordPress

3 ways to add Google Analytics to WordPress

There are multiple ways to add Google Analytics (GA) into your blog, and depending upon your level of blogging you should pick one of the below-mentioned methods. I’m putting down the different methods based on my recommended methods

1. Google tag manager:

I started using Google tag manager in 2013 and it becomes my only tag manager for all my sites. It’s free and using it you can manage all the tags for your blog from one place. I recommend GTM to every professional and serious blogger.

It hardly takes 5 minutes to set up and once you are done, you don’t have to worry about tag management in the future.

Here is a 5 minute tutorial on integrating GTM on your WordPress blog.

2. Using your WordPress theme:

WordPress Theme Footer code

Many of you might not beware of the fact that most of the WordPress theme has an option to add header and footer script. You can use this to add GA tracking code to your WordPress site.

Simply copy the tracking code which you obtained in the step 1, and go to theme setting option, look for the option to add footer script and paste the code.

It will work seamlessly, and moreover, you don’t have to rely on another plugin for the simple task. The above screenshot is from popular Genesis theme framework.

3. Using Google Analytics for WordPress plugin

There are many Google analytics WordPress plugins available in plugin repo. Some of them are free and some are paid.

Google Analytics plugin by Monsterinsights is the most popular one.

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. If you want to see Google Analytics data in your dashboard Click on Insights > Dashboard

Of all the three options, I recommend Google tag manager option as it will make your life easier in the longer run.

If you are an experienced blogger & need more data like which category is the most popular.

Which authors are driving most page views then I suggest you use MonsterInsights plugin.

Here are essential GA tutorials for bloggers to move ahead in the series:

Do let me know which method you are using to add Google Analytics to your blog 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 LinkedIn.

maida
administrator
She has been working online,remotely for the past 20 years, managing the premium domain assets for one of the worlds top domainers. She is COO of Contrib.com and Zipsite.net

Have something to say?

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: