Knowing exactly how visitors interact with your WordPress site can teach you a lot about what works and what doesn’t. While analytics tools can help, they only track certain information by default.
Alternatively, Google Tag Manager provides an easy way to create and manage tags on your website without the need for coding. With this tool, you can create conditions for tracking specific actions on your site, such as how many times a document is downloaded, how often a link is clicked on, or how many people watch an embedded video.
In this article, we will explain what Google Tag Manager is, why it’s a valuable tool, and how to set it up on your WordPress site. Let’s take a look!
“You can’t improve what you don’t measure” is a famous quote from Peter Drucker. So, what does that mean?
In a nutshell, without knowing how certain aspects of your website are performing, it’s hard for you to know what to focus on. You may have one rockstar page driving tons of traffic to your site, but have no idea that is happening or why it’s so effective.
Analytics allow you to track how visitors use your site, to see which aspects are most successful and which are not. Common analytics to track include:
These are just a few examples of the valuable insights website analytics can provide. Knowing what posts and information are attracting visitors and which pages have the worst bounce rates will allow you to leverage your successes and shore up any weak areas.
Google Tag Manager takes the idea of website analytics to the next level. Rather than simply relying on the preset measurements offered by out-of-the-box tracking tools, Google Tag Manager allows you to create and manage your own tracking tags, so you can measure exactly what you want.
For example, any analytics tool will measure the number of visitors who land on a specific page, but what if you want to measure how many visitors click on a certain video embedded there? Google Tag Manager allows you to track data with surgical precision, so you know how people are actually using your site.
The real selling point of Google Tag Manager is that you can do this without advanced technical knowledge or coding experience. This tool offers a user-friendly interface that allows you to measure specific website activity via simple buttons and drop-down menus, similar to using WordPress.
You have probably heard of Google Analytics, or you might already be using it. Google Analytics is the most popular business analytics tool on the web. Google Tag Manager integrates with that platform, making it even easier to manage and track user data.
Google Analytics is included with the WordPress.com plugin-enabled plan, which is by far the easiest way to integrate it with your site. Once you have that set up, you can connect with Google Tag Manager for added functionality. We will cover how to set up these services in the steps below.
Once you have created your accounts and integrated them with your site, you can start tracking and managing almost anything you can think of. In addition to the analytics basics available by default from Google Analytics, you can use Google Tag Manager to create your own custom tracking tags and manage existing tags for more in-depth insight into audience behavior on your site.
Even if you don’t have an immediate need for creating custom tags, Google Tag Manager makes it quicker and easier to add basic tags to your site. The management aspect can also be a time saver if you track a variety of data across all of your pages.
If you’re ready to add Google Analytics and Google Tag Manager to your WordPress website, you’ll be glad to know that the process is simple. Here’s how to do it in just four steps!
The first thing you will want to do is set up a Google Analytics account. If you are already using Google Analytics, you can skip to the next step.
To get started, visit Google Analytics and click on Start measuring to create your account:
This will take you to the account setup page, where you will enter some basic information about the account you are creating:
You will be given some options for data sharing, which you can toggle on or off. When you are finished, click the Next button to proceed:
The next section is the property setup page. Here you will enter some general information for the site or business you wish to track:
On the following page you will enter some more specific information about your business. These settings will help you get started (and can be adjusted later):
Finally, click on Create and accept the terms to complete your Google Analytics account:
Now that your account is complete, you will arrive at the Google Analytics dashboard. You will be taken directly to the Data Streams tab, where you can add your first data stream to start collecting data from your website:
Most users will want to select the Web option. On the following page, you will enter the URL of the website you would like to start tracking. You only need to do this for your site’s main page, and should not set up separate data streams for all of your pages:
You will then be provided with some information about your new data stream, including the Measurement ID at the top right:
The Measurement ID is required to add Google Analytics to your WordPress site. You will need this code for Step 3, so jot it down or leave this tab open for the time being.
You can easily head over to Google Tag Manager from within the Google Analytics dashboard, or visit the platform’s website. Since you should already be signed in to your Google account from the previous step, the account creation process is very simple.
Once you log in to Google Tag Manager, click on Create Account to get started:
You will then enter some basic information, including the URL of your “container”. The container is the website that you will be integrating with Google Tag Manager:
Once you are finished, click on Create to complete your account. You will be presented with some code snippets that you will need to integrate with WordPress in Step 4:
You can either copy this code to your clipboard, or leave this tab open while proceeding to the next step.
In this step we will cover two methods for connecting Google Analytics with
WordPress. This can be done via plugins or by linking your Measurement ID in the Tools tab of your WordPress dashboard. In either case, you will need a WordPress.com plugin-enabled plan.
One popular plugin for adding Google Analytics to your WordPress site is MonsterInsights. This tool makes it easy to connect your site to Google Analytics, and adds some additional functionality (including analytics reports right in your WordPress dashboard).
The first step is to install and activate the plugin. You should then see a new Insights tab in the left-hand menu of your dashboard. You should be prompted to connect with MonsterInsights and launch the setup wizard:
You should still be signed in to your Google account. If not, be sure to select the same account you used when you signed up for Google Analytics. Allow permissions for MonsterInsights, and follow the prompts to get connected!
Once you select your website’s profile and hit Complete Connection, Google Analytics will start collecting data. It may take some time for the data collection process to begin, after which you can view reports right from your WordPress dashboard by going to Insights and clicking on Reports:
You can also go to your Google Analytics dashboard to see different reports and explore other options. Once you have integrated Google Tag Manager, your capabilities will be further enhanced.
If you want to avoid adding an extra plugin to your site, you will need to add the Measurement ID from Step 1 to your WordPress settings. To do this, click on Tools in the left-hand menu of your dashboard.
Select Traffic at the top, and scroll down until you see Google Analytics. Again, this requires a WordPress.com plugin-enabled plan:
Simply enter your Google Analytics Measurement ID, and click on Save settings to start collecting data:
Now that you have Google Analytics connected to your WordPress site, you are ready to integrate Google Tag Manager.
The final step is to integrate Google Tag Manager. To do this, you will need the code snippet from Step 2.
First, you will need to install the Insert Headers and Footers plugin to add custom code to your site. Once the plugin is installed and activated, go to Settings and select Insert Headers and Footers.
Simply copy the code as directed in the Google Tag Manager instructions:
Copy the first snippet and paste it into the “Header” section. Then copy the second snippet and paste it into the “Body” section. The second snippet should still function if pasted into the “Footer” section, but it is recommended to have it higher up in the code:
Once you click on the Save button, the process is complete. You can now start
creating custom tags for your WordPress Themes and tracking them using Google Analytics.
Now that you know how to add Google Tag Manager to your WordPress site, you can start creating and tracking custom tags. With these tags, you can gather custom data for more valuable details about how your site is used.
To add Google Tag Manager to your WordPress website, just follow these steps: