If you’re looking to figure out How To Add Google Analytics to WordPress, you’ve come to the right place.
What is Google Analytics?
Google Analytics is probably my favorite blogging tool I have. Google Analytics is a FREE service offered by Google (I’m sure you could have never guessed by the name) that will help website owners track website traffic. The service can help you discover any type of information about your website traffic that you could have ever imagined knowing.
You are also able to easily create custom reports to track specific items on a monthly basis.
Have you ever wondered how to tell where your traffic is coming from? What City do most of my hits come from? What page on my website is hit the most? How long are my users staying on my blog? How many different pages does a visitor view whenever they come to my website? Or say, you’ve been getting a lot of comments on a specific post recently but you were wondering how the heck these people found your site??
Google Analytics is an extremely powerful tool that can help you answer all of the questions above plus many more about your website traffic.
My favorite part of Google Analytics is that anyone can figure it out. It’s not too technical where you would need three people to analyze and interpret the data. The dashboard and graphs used to display trends is simple and graphs in a simple yet colorful way to help your eyes recognize trends.
How To Add Google Analytics To WordPress
Step One: Create a Google Analytics account
Visit the Google Analytics site and if you don’t already have an account, click the Sign Up button.
Complete the steps to create a new account and then click the “Get Tracking ID” button.
Accept the terms and conditions.
Step Two: Create a property and get a unique Google Analytics tracking Code
On the screen below, you will be taken to your new “property“. Any website that you want to track with Google Analytics will need to be assigned their own “property”. Each property has their own code that will uniquely track that specific domain.
Step Three: Copy Google Analytics Tracking Code
Copy the above code within the Website Tracking section. This is the code you will need to add to your website in order for Google Analytics and your website to communicate with each other.
Tip: Open a new web browser window and leave this window open for easy reference in the next steps.
How To Add Google Analytics to WordPress
There are several different ways to add your Google Analytics tracking code to your wordpress site, but the least difficult and efficient way I’ve found is to download a plugin that is specific to this. You can also add the tracking code directly to the theme’s header.php file, but I find it much easier to remember where this code “lives” when you have a specific plugin specifically for this. You will also be able to use this plugin for other projects when you want to easily update your sites headers and footers without digging into the code itself.
Go to your Plugins section on your dashboard and select “add new“.
Search for the plugin called “Insert Headers and Footers“, click Install Now and Activate it.
Once installed, you will open the plugin by going to Settings > Insert Headers and Footers.
You will paste the code you copied from Step Three above into the “Scripts in Header” box. Click Save.
After clicking Save, you have successfully learned how to add Google Analytics to your WordPress site! Congratulations!
Note: Once you have successfully installed the Analytics tracking code, it can take up to 24 hours for data to start displaying on your dashboard. However, you can check your web-tracking setup here immediately to make sure you’re collecting data correctly.
Now the fun begins. When you view your dashboard in Google Analytics, you will start to see graphs and statistics on your website traffic.
On the left hand side of your Google Analytics page, you will see several pre-built reports that you can use to track your traffic.
- Real-Time tab shows you how many users are visiting your website in real time.
- Audience tab will show reports to give you an audience overview of your users.
- Acquisition reports explore how your users found your site.
- Behavior reports show what your users do while on your site.
- Conversion reports show how you meet your goals and if you convert your traffic to sales (ecommerce usage).
Hopefully this article has helped you learn how to install Google Analytics in WordPress.