This article will show you how to set up Google Tag Manager but first…
Google Analytics offers a wealth of data for tracking website activity. However, there are occasions when more precise information and improved reporting are necessary. Gathering optimal data is crucial to expanding your business’s online presence, converting leads into customers, and fostering better relationships with your audience. Therefore, incorporating tracking tags could be the solution for you.
What is Google Tag Manager?
Google Tag Manager is a platform where you can create and manage tracking tags. Tag Manager simplifies tag management through a single user interface, eliminating the manual process of individually adding each tracking code to the site. By placing just one tracking code on the website, users can oversee all their tracking requirements using Google Tag Manager.
What are Google Tags?
Google tags are pieces of code that you can effortlessly place on a website to track a wide range of activities. In a broad sense, you integrate this code into your website’s HTML or JavaScript to monitor specific events on the site.
Data such as page views, the number of form submissions, understanding the traffic source, identifying the most clicked links, determining the time users spend on a page, and even tracking removed products from the cart are all crucial from a marketing perspective.
Tags can be tailored to monitor any specific information. For instance, if you wish to track the number of users signing up for a newsletter, you can create a tag specifically for this purpose. Subsequently, this tag will transmit more accurate data to platforms like Google Ads, Google Analytics, or other third-party sites.
Google Tag Manager proves exceptionally useful when you want to avoid coding for tracking each event. All you need to do is insert a tracking code once for the pages you intend to monitor, and then you can quickly generate tags using Google Tag Manager.
Let’s get started by setting up Google Tag Manager.
How to Create an Account on Google Tag Manager?
Signing up and setting up an account on Google Tag Manager is easy. Please follow the instruction below to get started.
Creating Google Tag Manager Account
- To get started with GTM, you must visit the official website of Google Tag Manager.
- And click on the “Start for free” button.
- After you sign up, you’ll be asked to create a GTM account and a container.
- Now, enter the account name used for GTM, for example, Web, Android, IOS, and AMP. And other essential information.
- Once filled, you can proceed by clicking the “Create” button.
Where can I find the Google Tag Manager code?
There are two places where you can find the GTM tracking code. Google Tag Manager provides all the instructions for the code placement and the exact code to use.
- You can view the code by clicking GTM ID beside the Preview and Publish button (In the header part of the site).
- You can also locate the tracking code by clicking on Admin in the site’s header section, and in the container section, click on “Install Google Tag Manager.”
Both options will provide detailed instructions for placing the GTM code on the website with the tracking code.
Add Google Tag Manager container code to the website
You can follow the instructions provided by GTM for code placement. You must add the initial <script> code within your website’s <head> area. This code holds significant importance as it instructs your webpage or website to load the code when it is visited. Once the code is loaded, the website and the GTM code can operate simultaneously.
Here’s an example of the head tags and the GTM <script> code placement.
The second tracking code, which is a <noscript> code, should be positioned right after the commencement of the <body> tag. This second code is a backup in cases where the browser does not support JavaScript. When JavaScript is disabled in the browser, the second code generates an iframe version of the GTM container for the page.
Here’s an example of the body tags and the GTM <noscript> code placement.
Please note: While both codes can be added to the <body> section, both codes cannot be placed in the head tag. Only the <script> should be included within the <head> tag. As previously mentioned, the <noscript> code renders an iframe and must not be inserted into the <head> code, as doing so would render your website’s HTML invalid.
One more thing to mention is that adding the second code is optional for most cases. The purpose of the second code or the <noscript> code is to track users who do not have JavaScript enabled, and this audience accounts for a tiny fraction of the internet.
Using Plugin to Set Up Google Tag Manager
There are other easy methods to set up GTM on your website; one way is to use plugins. If you use any popular CMS (Content Management System), you will likely find relevant plugins to establish Google Tag Manager for your website.
Here are a few examples of plugins that can be used to set up GTM for popular CMS:
- If you are using WordPress, I recommend using GTM4WP. It’s the best and most easy one.
- If you are using Shopify, then you can use Elevar Conversion Tracking
- Magento also provides some good options for plugins to set up GTM
Additionally, Wix users can directly integrate GTM into their websites, as Wix offers a built-in Google Tag Manager setup option.
How to check if Google Tag Manager is working properly
After completing the setup for GTM, you have to ensure it’s working correctly on the website. There are a few methods to check whether GTM is working or not.
- Right-click anywhere on your website page and then click View Page Source. Now find or search for gtm.js
- In the header section of Google Tag Manager, click on Preview, and type the URL of your website. Once the page is loaded, you should see the GTM Preview and Debug mode modal at the bottom of your website.
- You can also use the extension to find the code on your website. Here is the link to the extension Tag Assistant Legacy (by Google)
The abovementioned methods can be used to check whether the GTM works correctly.
FAQ’s
No, Google Tag Manager provides two options: free and paid. While the free plan should cover all the essential and valuable functions of using GTM, large enterprises can choose the paid plan of GTM, which is Google Tag Manager 360. Check the comparison here.
Wrap-Up
You can always follow the instructions provided by Google Tag Manager to set up GTM.
The recommended method for setting up GTM is to place the <script> code in the head section of your website, while the <noscript> code should be placed in the body section of your website.
Using any well-known CMS, you can achieve the same results using plugins.
If you need help, contact me.