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 evaluate the success of your website.
In this guide, you’re going to discover the best analytics program for tracking visitors and two ways to add it to your site.
Which analytics program should you use?
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.
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.
For instance, you might want to track eCommerce sales made with WooCommerce or measure how many visitors are opting into your MailChimp email list. There are already WordPress plugins available that can handle these integrations and many more just like them.
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.
There are two ways I recommend adding Google Analytics to your site. Choose whichever you think will work best for you.
Manually add the tracking code
Google Analytics will supply you with a tracking code that needs to be added to every page of your site. Here’s how you can find the tracking code in your Google Analytics dashboard:
You don’t need to do anything with that code besides copy and paste it. No programming required – I promise 🙂
The tracking code needs to be included within the “head” element of your site. While you could edit the header.php file in your theme to do this, it’s never a good idea to edit theme files.
Instead, install the free Insert Headers and Footers plugin.
This plugin makes it simple to include scripts in the header and footer of your site. Once installed and activated, you’ll see a new settings page added to your dashboard where you can add the script.
Copy the Google Analytics script and paste it into the header section to add it to every page of your site, like this:
Click the Save button at the bottom and you’re done!
If you have a caching plugin installed, make sure to empty your site’s cache and the script will then appear on every page. You’ll now start seeing traffic in the Google Analytics dashboard.
Add Google Analytics with MonsterInsights
While the above method works great, there’s another approach for adding GA that you may prefer.
Google Analytics can be easily added with the help of the MonsterInsights plugin.
One advantage of using MonsterInsights is that you don’t need to manually add the tracking code. Instead, there’s a simple authentication process that will confirm your Google Analytics account.
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 to using MonsterInsights.
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 this gives you a simpler way to view your basic traffic analytics.
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.
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 subscribers and other user roles as well.
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.
The Insert Headers & Footers plugin is very light and allows you to quickly add the GA tracking code to every page of your site. If you want something a little more robust and a way to view simplified reports, try out MonsterInsights.
All of our themes are fully compatible with both plugins, so feel free to use whichever method of adding Google Analytics you prefer.