📢 Tatvic is now a global partner of Usercentrics, world’s leading consent management platform

Google Tag Manager tips and tricks for Intermediate users

Last Updated:


Since the release of Google Tag Manager, it has helped make the lives of marketers easier with tracking codes. If you’re one of the people that are involved in tracking data on a small or a large website, Tag Manager can help save a lot of time and effort.

In our last blog, we discussed the Advantages of Environments & Workspaces, dataLayer, Import & Export GTM Containers, and how to Preview, Audit & Publish. In this post, we’ll discuss some advanced tips and tricks of Google Tag Manager that will help you make better use of Google Tag Manager as a tool

Exercise Nested Variables

Tip: Use the Built-in or User-defined variables to fulfill the need of passing multiple variable values in a single parameter or to create a new User-defined variable holding all the values.

GTM gives you the ability to utilize variables inside variables.

For example, we can pass the GTM Container ID and Version in a custom dimension to bifurcate the hits coming from the older versions and newer versions of GTM.

This feature of Google Tag Manager empowers an individual with the capability of using different variables separately as well as in combination with each other as and when required

Tag Manager
Use of inbuilt variables to pass multiple values in a single parameter

View Full Hostnames

Trick: With the help of built-in variables Hostname and Page Path we can update the page parameter in GTM to get the complete URL.

In some scenarios, like having multiple domain data coming into a single GA property, the requirement arises that we need the details of the domain in our GA reporting. With the help of filters available in GA, we can update the page path with the full domain. Another way to do so is by updating the page parameter in GTM itself.

All you’ve got to do is turn on two more of GTM’s built-in variables: the Hostname and the Page Path. At that point, you jump back into your Google Analytics page, see the tag in Google Tag Manager, and select “page” as a field to set. This will allow you to overwrite the page path that’s sent into GA so that you’re not as it was seeing the path only i.e. everything that comes after .com or.org etc., but with the hostname attached to it.

Google Tag Manager
Update Page parameter with full URL

Track Outbound Clicks

Tip: Tracking outbound clicks will help understand from which URL the maximum traffic is moving out from the website.

Tracking outbound clicks is comparable to tracking onsite report downloads, but it does require more GTM configurations. Instead of just turning on a built-in variable, you’ll be creating what’s known as an Auto Event Variable that will get the hostname of the clicked URL. Auto Event Variable permits you to get to information points about interaction, so if somebody is clicking a URL, we need to be able to seize the hostname of the URL, since the hostname isn’t the hostname of our site, we need to track that as an outbound tap.

But as with everything, be careful of how you’re collecting that information and how you eventually need to display it. We’ve seen cases, where every single outbound connect, was followed by printing the whole URL into Google Analytics. What actionable data is that attending to allow anybody? No one ought to see every single interface here; what you want is to pinpoint the bigger patterns, like which domain your clients are finding most alluring. So don’t send the whole URL of the outbound interface into Google Analytics; send the hostname only and you’ll get a report of how numerous individuals clicked on about-us of Tatvic, to Wikipedia, to Google, etc.

Configure Subdomain Tracking

Tip: To avoid the appearance of your domain name in your GA reports while users are exploring between diverse subdomains of your website you need to have subdomain tracking configurations in place.

In the event that you’re seeing your domain appear in your Google Analytics reports, there is the likelihood of a subdomain tracking issue. There is a common misconception that subdomain tracking and cross-domain tracking are the same and they are often used interchangeably by many individuals.

Subdomain tracking is for once who need to be able to track users exploring between diverse subdomains of your website, for example, www.blog.www.tatvic.com and www.tatvic.com.

What we have to do is set “CookieDomain” to “auto” in GTM, which flips things around. On both locations, GTM will attempt to set the cookie on .com- or .xyz, which doesn’t work since that’s a domain extension; at that point, another component it gets to is Tatvic, which checks out so the cookie for both locations is set within the same put and everything is in place.

Google Tag Manager -
Configurations for subdomain tracking

Configure Cross-Domain

Tip: When two or more domains that can be a part of a single user journey, cross-domain tracking can be done to stitch the user journey.

Cross-domain tracking is when you speculate it, you need to track users navigating between totally distinctive domains. All you need is cross-domain tracking after you have two or more domains that can be a part of a single-user journey.

So on the off chance that you’ve got to send clients to a third-party website for payments, or in the event that you’ve got a good number of websites that users will actually move to and fro, use this.

In GTM it’s a straightforward matter of altering your analytics page to set tags to “allowLinker” and after that heading to the Cross-Domain Following subsection of that same tag including a comma-separated list of your spaces. And here’s a portion that’s simple and people tend to forget: you must jump into Google Analytics (not GTM) and include all of those website locations to your Referral Exclusion List.

These tips & tricks, which you should absolutely try, will enable you to gain insights so that you can come up with your own tips. With that in mind, keep moving forward and happy optimizing!

Get a health checkup of your Google Tag Manager and Google Analytics account today!

Picture of Vatsal Dalwadi

Vatsal Dalwadi

Vatsal works as a creative designer at Tatvic. He helps the CRO & campaign team by creating persuasive designs that generate results. In his spare time, he likes watching Sports and reading philosophical books.

Sign up for
our monthly newsletter

This field is for validation purposes and should be left unchanged.
Scroll to Top

Leverage Tatvic's comprehensive approach to 

Enquire Now

This field is for validation purposes and should be left unchanged.

Leverage Tatvic's comprehensive approach to 

Contact Us

This field is for validation purposes and should be left unchanged.