How to Add Google Analytics to WordPress
Every website needs analytics.
Can you imagine running a restaurant where you can’t see your customers and you don’t know what they’re ordering? How could you ever be successful?
That’s what running a website without an analytics program is like. You don’t know who’s showing up or what they’re doing.
You need analytics to measure the success of your website.
In this guide, you’ll discover the best analytics program for tracking visitors and the easiest way to add it to your site.
Why use Google Analytics
If you’ve worked with websites before, you’ve probably heard of Google Analytics.
Google Analytics (GA) is the most popular analytics program available, and it’s also completely free. You can track everything you can imagine with GA from simple visitor reports to custom events and conversions.
There are three reasons why I use GA and recommend it to all my customers.
Too busy for WordPress? We can add analytics for you.
WP Site Partner is our new maintenance and customization service for busy WordPress users.
GA is an incredibly robust analytics platform. It automatically tracks a ton of information about your visitors and can be customized in a myriad of ways.
It’s unlikely you’ll come up with a question about your site visitors you can’t answer with this tool.
That said, I understand why this completeness also comes with an intimidation factor. Even if you feel like you don’t need an advanced analytics platform, I still think you should choose GA. More on that later!
All the integrations
As the most popular analytics tool, Google Analytics has the advantage of integrating with countless other apps.
Most WordPress plugins that have trackable actions are already integrated fully with Google Analytics.
The Google Analytics platform is here to stay and there are no plans from Google to make it paid. They already have a premium version tailored for large enterprises.
The continued development of this platform means that you can expect it to improve and stay available in the future.
Google consistently adds new features to keep pace with trends like real-time analytics and GDPR compliance.
How to add Google Analytics to your site
Creating a Google Analytics account will take just a moment since you can use your existing Google account. You can follow their official getting started tutorial if you need additional help with your account creation.
Once you signup and add your site, you’re ready to start tracking.
Add Google Analytics with MonsterInsights
In my opinion, the best plugin for adding Google Analytics to WordPress is MonsterInsights.
One advantage of using MonsterInsights is that you don’t need to manually add the tracking code. Instead, you follow a simple authentication process that will confirm your Google Analytics account.
This video will walk you through all the steps to add the Google Analytics tracking code to your site with MonsterInsights.
You’ll be asked to login to Google and give MonsterInsights permission to access your analytics account. MonsterInsights will then automatically add the tracking code for you.
There are a few other advantages of using MonsterInsights over other analytics plugins.
If you don’t want all the complexity of the Google Analytics dashboard, you can view simpler traffic reports in MonsterInsights instead.
You can always login to your Google Analytics account if you want more complex reports, but it’s nice being able to look over your traffic each time you login to your site.
Since MonsterInsights outputs the tracking code for you, it can customize the code based on what you want to track. By default, MonsterInsights will add enhanced link attribution which lets you see which outbound links visitors are clicking on your site.
You can also track file downloads as “events,” record demographics, and track affiliate links going through a subdirectory. All of these features are added automatically.
MonsterInsights won’t output the tracking code if you’re logged in as an admin or editor. This is nice because it prevents you from disrupting your own data while you work on your site.
This feature can be enabled for other authors on the site as well.
While the base plugin is 100% free and works great on its own, you may want to purchase some of the paid add-ons.
I use the eCommerce tracking and GDPR add-ons here at Compete Themes, and they saved me a ton of custom development time I would have otherwise spent making these integrations on my own.
There are loads of other features too like page speed reporting, author-based traffic reports, scroll tracking, and more
Analytics is a must-have feature for any serious website.
Google Analytics is a massive product and it will take some time to familiarize yourself with it. However, it only takes a few minutes to add tracking to your site with MonsterInsights.
It’s the best way to get started with Google Analytics and provides plenty of room to grow with the more robust paid add-ons.
All of our themes are fully compatible with Google Analytics and MonsterInsights, so you can expect a seamless experience on your site.
And if you want some more options to consider for your website, check out our list of the top analytics plugins for WordPress.