Previously I have written a post about how Link Click Listener and Click Listener works in Google Tag Manager. That was for using with old version of GTM. The below is how you can implement these two for new Google Tag Manager.
How to implement Link Click Listener and Click Listener in new GTM
I will skip the parts about creating GTM container and such as these are mentioned in my old post. Instead I will just go right to the part where you create these two listeners.
- In new GTM interface, the naming has changed. Rules have been changed to “triggers”, Macros have been changed to “variables”.
- New GTM has Enabled Built-In Variables which basically means you now don’t have to manually create Variables (Macros) for GTM Container ID.
I think this is cool because it saves a lot of time for me to create these and now I just have to tick/check any Variables I want to implement.
Link Click Listener Implementation in new GTM
1. Go to Triggers and click on New Trigger:
4. You can put max.wait time (which means delay link open until all the tags that depend upon this event have fired or the specified timeout has elapsed, whichever comes first)
7. And then once you click save, it is done. You have set up a trigger to track all link clicks happening on your website.
Click Listener Implementation in new GTM
Similarly to link click listener implementation, implementing click listener follows the same process.
Note: Before creating this tag, you might want to enable your built-in variables such as Click ID, Click Target etc.
Note: This post also appears on zinkohlaing.blogspot.com.