It’s already been a couple of years since the new Google Tag Manager (GTM) was introduced. And everyday, I am finding and learning new things that do not cease to amaze me. Though Custom HTML tags solve almost anything for us, but we tend to feel secure when it is done via GTM itself.
Fields to set parameters
Most of us have used this feature which falls under the Universal Analytics tag configuration. This feature leverages us to use all configurable fields name which are listed under this link. We can set almost every field listed in that list with just “&fieldName” and give it a value. For example, You want to modify the document title to some custom value. You can simply use “&dt” equals to “titlevalue”. Do make sure that you have assignment value available when you are using “&fieldName” as GTM will enforce it to pass it with hit. If you do not have value assigned then it will be passed as null/undefined. I have been using it for the following:
- To set virtual pageviews
- To set up userId
- For setting up cookieDomain as auto or
- For setting up the campaign parameters which are listed for Universal Analytics implementation for different projects.
In my experience of working with GTM, I have found some unexplored parameters which can be useful.
This field executes operation after the tag fires successfully regardless of whether it is sent successfully or has failed. We can also achieve via tag scheduling as well. But tag scheduling does not wait for the first tag to complete the execution. So if your solution is interdependent that you can use hitCallBack.
- Fetch ClientId from “_ga” cookie after pageview tag fires. This cookie will be set with the first pageview itself
Image: hitcallback image
- Restrict transaction tag (Enhanced Ecommerce) to fire multiple times: Simo’s solution
A lot of the times we want to start and stop sessions for data cleanliness likein some cases where website is accessed by single machines but users are different every time. A classic example would be food ordering systems in coffee shops. sessionControl variable takes only 2 values “start” and “end”. As per the values, Google Analytics will start new session or stop the ongoing session respectively. It is very likely that we can use this for gathering data for different analysis.
- Website accessed through Single machine, used by multiple users
- New session of every transaction/specific action performed by user
Default name of analytics cookie is “_ga” but in many cases (when multiple UA codes are implemented ) we want to separate our implementation of tag manager with others. That’s when we can change the cookie name of UA. When you use this field, you can modify the cookie name and which ever tag contains that field set, data will be sent to Google Analytics by referring to the newer cookieName.
Now, if i want to fire my tag first, in multiple tags firing in a race, I will use Tag firing priority whereas if I want to apply sequencing of tags, I will use Tag Sequencing. But can I restrict my tag to fire in the morning time only or can I fire these tags during a specific time. Well, yes of course I can. Let’s find out how.
Tag scheduling is one of the lesser known features and when we started using it, we realised the efficiency and the use cases have only increased since then.
Image: tag scheduling
So far we have only covered a couple of features in this blog, GTM has many other unexplored features and it is not possible to accommodate all of them into one single blog. So we would be coming with a series of blogs regarding these features’ explanation and usages. In the upcoming blogs, we will cover auto event variable, tracker name and global function name configurations, history change triggers and variables.
In the meantime, if you have any questions, please feel free to comment. We would love to answer your queries.
Latest posts by Jigar Navadiya (see all)
- The Science Behind App Uninstalls Prediction – Part 2/2 - June 19, 2017
- Google Optimize 360 : The Power House of Personalization - June 2, 2017
- Outstanding Paragon of Google Tag Manager Part 2 - May 15, 2017