If you are using a Wordpress website and looking to set up Google Tag Manager (GTM), you/ve come to the right place. This article aims to provide a complete tutorial about google tag manager Wordpress installation and connecting google analytics with google tag manager.
First things first: You should know the difference between wordpress.org and wordpress.com. In order to add google tag manager to Wordpress we will use DuracellTomi google tag manager for Wordpress plugin.
Install Google Tag Manager Plugin In Wordpress
Let’s get started by installing Google Tag Manager Wordpress plugin. In your WordPress dashboard navigate to Plugins > Add New and search for DuracellTomi’s Google Tag Manager.
You will see this
You can also install it manually by downloading it from WordPress site and adding the file into your plugins folder.
Once you install google tag manager Wordpress plugin, activate it to start using GTM. But wait, that’s not all. Now, you will need to connect this plug-in with GTM and Google Analytics.
In your wordpress dashboard, from the left menu, go to Settings > Google Tag Manager and you should see something like this
Let’s move to Google Tag Manager now. Open a new tab in your browser and type in "tagmanager.google.com" and press “Enter”. Sign in with your Gmail account details; If you don’t have a Gmail account then sign up for it.
Note: Remove any other google analytics script that you have inserted on your site for proper implementation.
Once you have logged into GTM you will have to create an account and a container for your site. The initial account structure will be something like this.
Let’s create our first account by filling the proper details. Type a name for your account in the ‘account name’ field. You can enter your website’s name or your company’s name. Enable the checkbox ‘sharing data anonymously with Google and others’ and click continue.
Next enter a container name and select ‘Web’ for inserting the container into your Wordpress site. Click create and a pop up window will open showing GTM terms and conditions. Click yes and you will see a container snippet showing Google Tag Manager code and then click “ok” to terminate the container.
Where to put Google Tag Manager code?
Copy the Google Tag Manager tracking ID that was generated after we created the container. You can find this tracking ID on the top navigation bar as shown in the picture below, or in the code snippet container which was popped up after accepting the GTM terms and conditions.
The tracking ID is located on the top navigation bar and is similar to GTM-XXXXXX. Copy this code and go to your Wordpress dashboard.
Now paste this code into the DuracellTomi’s ‘Google Tag Manager ID’ field and click save changes.
By now you have successfully integrated google tag manager WordPress using DuracellTomi’s plugin. Are you done? What’s next?
Adding Google Analytics With Wordpress
Google Tag Manager wordpress tutorial is not just about installing a plugin but also getting reports in google analytics.
To view your website reports, you will need to connect Google Analytics account with tag manager. Let’s see what reports are we capable of getting in the Google Analytics account.
If you are new to GA, please read how to Get started with Analytics. I am assuming that you already have a Google Analytics account. Follow the steps below for creating a new pageview tag in GTM.
Inside your container create a new tag and select Google Analytics tag template.
Select ‘Universal Analytics’.
Add Google Analytics ‘Property ID’ (where is google analytics property id ).
Choose the track type as ‘Page View’ and click continue. Additional kinds of tracking will let you know what other things you can track.
Enable ‘Display Advertising Features’ checkbox to view demographic reports in your analytics reports.
Choose the firing trigger as ‘All Pages’, which will fire the page view tag on all pages of your site.
Finally, click ‘Create tag’.
Your final tag should look similar to this:
This simple tag will allow you to receive data in google analytics such as the number of users visiting your site, pages they are viewing, their time on site, bounce rate and much more.
Verify Google Tag Manager Wordpress Installation
The last thing is to verify if we have added google tag manager Wordpress plugin successfully. For this, we will install Google Tag Assistant extension in chrome browser. Once installed, click on the tag icon and enable it. Now reload your site and click on the tag assistant icon, if you have properly followed the steps you should see tag manager icon and analytics icon as shown in the picture below:
The blue color in analytics icon indicates that there are some minor issues with GA code while tag manager is working properly. Google tag assistant help provides more information about queries related to tag assistant. Your task is to find out how to resolve the blue color analytics icon issue.
The other way to verify is to open google analytics reporting tab and check Real Time reports. You should see the number of visitors on your site and if you don’t see any, open your site in a new tab and check again.
So far we have successfully completed Google Tag Manager Wordpress installation and started collecting data in Google analytics. I hope you also succeeded in getting the things done and if you are missing out on something, please let me know. Good Luck! :)
PS. This is the very basic analytics setup which allows you to start seeing pageviews. From here you can do a few things: