Understanding triggers in Google Tag Manager

Trigger Events

A trigger event is one of the conditions when the trigger should fire/execute. Following are the various events when a trigger can be fired:

#1 Pageview – fire the trigger on pageview

#2 Click – fire the trigger when a click event occurs.

#3 Form – fire the trigger when the form submit event occurs.

#4 History Change – fire the trigger when the user’s current browser history changes.

#5 Custom Event – fire the trigger when the custom event occurs.

#6 JavaScript Error – fire the trigger when a javascript error occurs.

#7 Timer – fire the trigger after a given interval.

In GTM v2, triggers have been made an integral part of a tag creation process, so you can not create a tag without first creating corresponding trigger.

There are two methods of creating a trigger in GTM v2: one is while you are creating a new tag and one is through the triggers menu.

fire on

Creating a trigger while creating a new tag

Moreclick on this button to select an existing trigger or to create and select a new trigger.

 

Click Trigger

When you click on the ‘Click’ trigger button, you see an ‘Create trigger’ dialog box through which you can select trigger type: ‘click’ or ‘link click’:

create trigger

If you select ‘Click’ from the drop down menu, your tag can fire on any click on your website, no matter which element a user clicks on.  If you select ‘Link Click’ from the drop down menu, your tag will fire only on clicks on a link(s).

Once you have selected ‘Link Click’ as trigger type, you will see additional fields: ‘Wait for Tag‘, ‘Check for validation‘ and additional filter field:

trigger link click

Select the checkbox ‘wait for tags‘ to delay the opening of the links until all dependent tags have fired or specified time (i.e. max wait time) has elapsed, whichever comes first.

Select the checkbox ‘Check Validation‘ if you want the tag to fire only when the link has actually being clicked i.e. the click on the link takes a user to another page.

You also need to set up filters to specify when your link click trigger should fire. For example, I want to fire a tag on the page whose URL contains ‘/shop/men/shirts/’ and when the ‘Click ID’ is ‘smshrt’. That’s why I set up the following filters:

url contains /shop/men/shirts

Click ID equals smshrt

 

Form Trigger

 

form trigger2

When you click on the ‘Form’ trigger button, you see a ‘Create trigger’ dialog box:

form trigger

If you select ‘All Forms’, your tag will fire on submit event for any form.

If you select ‘Some Forms’, your tag will fire on submit event but only for selected forms. While configuring your ‘Form’ trigger you get the option to select ‘wait for tags‘ and ‘check validation‘.

Select the checkbox ‘wait for tags‘ to delay the form submit until all dependent tags have fired or specified time (i.e. max wait time) has elapsed, whichever comes first.

Select the checkbox ‘Check Validation‘ if you want the tag to fire only when the form is successfully submitted. If you keep this checkbox unselected then the tag may fire even when a user is just trying to submit the form.

You also need to set up filters to specify when your form trigger should fire. For example, I want to fire a tag on the page whose URL contains ‘/shop/men/checkout’ because this page contains my form. That’s why I set-up the following filter:

form fire on

url contains /shop/men/checkout

 

 

 

 

 

 

 

 

 

 

Learn about the Google Analytics Usage Trends Tool

The Google Analytics usage trend is a new tool which is used to visualise trends in your Google Analytics data and to perform trend analysis.


Do you want to Learn Web Analytics in 8 Weeks?

  • Learn and Master Web Analytics, Conversion Optimization & Google Analytics from Industry Expert in 8 weeks.
  • Lifetime access to the course + Lifelong FREE course updates.
  • New study material added every few months (lifelong learning).
  • Up to date training material.
  • Most exhaustive course on Google Analytics on the internet.
  • Hundreds of Assessments to test your learning.
  • Your 24/7, 365 days a year reference source.
  • Learn at your own pace and from any place.

Take your Analytics knowledge to the next level. Checkout my Best Selling Books on Amazon

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Himanshu Sharma

Certified web analyst and founder of OptimizeSmart.com

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of OptimizeSmart.com and EventEducation.com

I am also the author of three books:

error: Alert: Content is protected !!