Google Analytics is a free tracking tool that gives you detailed reports of how users behave on your website: where are they from, from what devices they browse, how they scroll or interact with different elements of your site (videos, carousels, buttons, etc.).
Most of all, by using Google Analytics you’ll understand which marketing channels are bringing you the most value, or which ones are leaking you money.
The Google Analytics reports are a goldmine if you know how to draw insights from them.
And it’s totally FREE!
So, let’s start with creating your Google Analytics account, here.
How to set up your Google Analytics account
Now, when you’re reading stuff on Google Analytics, you’ll find out about its two versions:
- Universal Analytics (UA)
- Google Analytics 4 (GA4) – the recent default Google Analytics.
Universal Analytics is very much web-focused, while Google Analytics 4 can provide cross-platform data (mobile + web). This is the main difference, but not the only one. I’m not going into detail right now, because this is not the purpose of this article.
Some experts out there consider that you should install both of them on your site because GA4 is not mature enough to be used as a standalone web tracking platform.
In this article, I’ll just go through setting up Google Universal Analytics very fast (the GA4 setup is similar).
So, after creating your Google Analytics account, log in and:
Set up a Google Analytics property
A property represents your website or app and is the collection point in Analytics for the data from your site or app.
- From the Admin level, select your desired account (if you have more than one);
- Head over to the “Property column, and select “Create Property”;
- Name your new property, eg: the website’s name.
- Select the currency and time zone. Future changes of the time zone don’t work retroactively;
- From the “Advanced Settings” toggle on “Create a Universal Analytics property”;
- Type in your website URL;
- Tick the option that creates both GA4 and UA properties. They will have different ids. If you named your property “My Website”, your Universal Analytics property will be named “My Website (UA-1234567)” and your Google Analytics 4 property will be named “My Website – GA4 (98765432)”;
- Select “Next”;
- Provide the required information about your business;
Now, you’re done!
Set up a reporting view in your Google Analytics property
Views allow you to filter your data, maybe you want to have a different view for your site and blog, or you want to filter out employees’ IPs.
- The admin view has three columns: account, property, and view. In the view column select “Create view”;
- Select either Website or Mobile App;
- Name your view and select the time zone;
- Save your view by clicking on “Create view”;
- Now you’re back to the admin area and it’s time to select your view for making additional settings.
- Name your view;
- Type in the website URL;
- Select the time zone country or territory: this will affect the hour and day for which you’ll see the reporting;
- Make sure to exclude bot traffic.
- Set up “Site Search”. If you enable site search you will be able to track what people are looking for on your site.
- Save your view.
Now that you’ve set up Google Analytics, it still does not track your site, they are not yet connected. We will need to place a tracking code on your site that will allow Google Analytics to collect data.
Add the tracking code to your WordPress website
Now there are two main ways for doing this: via a developer or Google Tag Manager.
In Google Analytics, the tracking code is found at the property level, Tracking info -> Tracking Code.
As mentioned above, in the instructions, you can send this code to a developer to place the code (script), as the first item into the <HEAD> of every webpage you want to track. He’ll know how this gets done.
But, I like to do this via the Google Tag Manager. Let’s find out how.
How to deploy Google Analytics on your WordPress website using Google Tag Manager
Let’s say you want to run some Facebook ads. You will need to use the Facebook tag on your site in order to let Facebook when conversions are happening due to your campaign. The same goes for Google Ads, Twitter Ads, Quora Ads, and so on.
But tagging doesn’t only happen for ads. You can even add the Google Analytics tag, or maybe the Mouseflow tag (which allows you to understand how users click and scroll on your site).
Now, these tags can be deployed manually, by your developers, inside your website’s code. But that wouldn’t be too wise. If they are too many, you might lose track of them, or install them twice..and it’s not quite a scalable process.
That’s why Google Tag Manager comes to the rescue. It allows you to deploy different types of tracking codes (tags) without needing to edit your website’s code.
Another cool thing is that it’s very easy to make changes to these tags, and you can even have a history of your changes. And if you run multiple websites, you can have an account for each of them. Your life just got easier. Some tags are so easy to deploy that anyone can do this, but usually, the folks inside your marketing team would be in charge. For more advanced tags, such as events or conversions, they might still need a developer around.
So, let’s start from ground 0: sign up for Google Tag Manager.
- Once you’re logged in, click the “Create Account” button.
- Now it’s time to name your account and select the country. You can use your website’s name.
- In the Container Setup step, type in your website’s name, then choose your platform: app or website (depending on what you need to track).
- Hit “Create”.
After agreeing to the Terms and Conditions you’ll be prompted with two…tags, as you might have guessed, which needs to be deployed on your site, onto the header.php and body of your WordPress site to be more precise.
Just head over to a developer to help you out with this
deploy it via the Google Tag Manager for WordPress plugin.
When this is done, you can create your first tag inside the Google Tag Manager!
How are you hanging on? Blink twice if you’re still with me :).
Now, let’s create our Google Analytics tag!
- Head over to “Add a new tag”.
- Give your tag a name, eg: Universal Google Analytics.
- Click on “Tag Configuration”, then choose the “Google Analytics: Universal Analytics” tag. It’s nice that there are lots of predefined tags in GTM.
- In this setup, click on the dropdown menu under Google Analytics Settings and select “New Variable”.
- Name your variable, then paste here the Google Analytics ID. The ID is the one you find at the property level of your Analytics account -> Tracking Info -> then tracking code, as shown below.
- Going back to the tag setup, from the Triggering level, select “All Pages”. This means that this tag will be triggered whenever a page is seen.
- Save your tag from the “Save” button in the upper right corner.
- Submit your change to GTM.
And you’re done! Google Analytics is deployed on your site. From this moment on you’ll be seeing traffic data in your account.
Now, if you want to learn more about how to use Google Analytics and Google Tag Manager, here is my favorite resource: the Measure School Youtube channel.
This process can be repeated for other tags as well. But things can get a bit more complicated than this when you want to track specific purchases on a site, or video plays, or button clicks, etc.
How to deploy Google Analytics on your WordPress website using plugins
So, by now you’ve found out how to deploy the Google Analytics tracking code on your site using:
- Manual installation via a developer
- Google Tag Manager
But there’s a third way!
Enter WordPress plugins…or, enter Monster Insights!
One piece of advice though…choose one method, if you try to deploy Google Analytics multiple times, you will get skewed results.
With over 3.000.000 users, Monster Insights is the best Google Analytics Plugin for WordPress.
After the plugin is activated, you’ll be guided to the setup. It’s pretty straightforward.
- Select “Launch the wizard”.
- Choose the category that best describes your website.
- Connect Monster Insights and Google Analytics, and give the plugin the needed permissions to access the account.
- Choose your desired Analytics property that you want to connect.
- When the connection is done, you’ll be taken to the final steps of the setup process. You’ll be prompted for the recommended settings for the Google Analytics plugin. Monster Insight allows you to track:
- Events tracking (default);
- Enhanced Link Attribution (default);
- File Download Tracking;
- Next, you can adjust the following settings:
- Affiliate Link Tracking;
- Access to MonsterInsights’s Reports;
- Automatic Plugin Updates
- When you’re done with these settings, just click “Done”;
- Next, you’ll get some add-on recommendations:
This is optional.
These are the final steps. Just save and you’re done.
Now, it will take a few hours for Google Analytics to send you data.
The moment everything is set up, you’ll be able to see some reports straight in your WordPress dashboard.
For more detailed reports, just go to Insights -> Reports menu from your WordPress dashboard.
Now, I’d like to present another useful tool that can help you connect multiple Google products to your WordPress website: Google Site Kit. This won’t deploy Analytics!
Here are the Google products that you can connect to your WordPress website:
- Google Analytics – Google Site Kit allows you to see Analytics reports inside your WordPress dashboard;
- Google Tag Manager;
- Search Console – it gives you an insight on how your website performs organically and how is your indexing;
- AdSense – this tool is one of the most successful ones that allow you to monetize your WordPress website using ads;
- PageSpeed Insights – this tool enables you to test your overall website performance;
- Google Optimize – a tool that allows you to test out various variants of your site without any coding knowledge.
Now, this tool is very useful when you’re using multiple Google products.
Aaaand, we can call it a day!