How Link Click Listener and Click Listener work in new Google Tag Manager

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.

 A few things to note:
  • 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.

GTM Built-In Variables

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.

 Here is how you can implement Link Click Listener in new GTM:

Link Click Listener Implementation in new GTM

1. Go to Triggers and click on New Trigger:

2. You will land to a screen as below. Under Choose Event> Select Click.

 3. And then under “Configure Trigger”,  select “Link Click”

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)

5. Under “Enable When”, you can use Regular Expression .* to match all pages – which means it will fire on all of your URLs. Or if you don’t want to track inbound links (the link clicks that is happening only within your site) and only want to track outbound links, you can create a rule to say don’t fire when the URL matches your URL (for example, for me, don’t fire if the URL starts with zinkohlaing.com etc)

6. Under “Fire On”, you can again choose to select “All Clicks” or “Some Clicks”. If you choose All Clicks GTM will fire this trigger on every link click happens. Otherwise, it will only fire on selected clicks that you define (for example, you can create a rule saying fire this link click listener on the page where you have outbound links but nowhere else)

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.

So step 1 and step 2 will be the same as above and in step 3, instead of link click listener, you choose “click listener”.



Then, for “Fire On” rule, the same thing as link click listener, you can either set up the trigger to fire on All Clicks or Some Clicks only.
And here is how the same tag looks like for Link Click Listener Event Tracking.

Note: Before creating this tag, you might want to enable your built-in variables such as Click ID, Click Target etc.

And then “On Fire” rule for this tag, click on “More” and select the trigger you have defined for Link Click Listener above.

The process is similar for Click Listener Event tag as well. Just that you have to change the trigger type to Click Listener Trigger.
So that’s it! This is how you can set up link click listener and click listener for new GTM. Give it a try and leave comments if you have any questions.

Cheers!

Zin Ko

Note: This post also appears on zinkohlaing.blogspot.com.

 

Recent Posts

Recent Comments

Archives

zinko Written by:

Hi, I am Zin Ko Hlaing. I'm a big fan of Manchester United and I occasionally write here. Full-time Football Manager player, part-time trying to understand the Internet. Opinions expressed are solely my own and do not express the views or opinions of my employer.

5 Comments

  1. Pablo Melchor
    September 22, 2015
    Reply

    Hi Zin Ko,

    Thanks a lot for both posts. I would be very thankful if you can answer two further questions:

    1) Do tags created as per your old post need to be migrated to the new model?

    2)Should I keep the listeners I created following the instructions on your old post or get rid of them?

    Thanks!

    • zinkohlaing
      October 20, 2015
      Reply

      Hey Pablo,

      Just saw your comments.

      1) If you allow Google to migrate to new GTM, they will be automatically updated so you don’t have to do anything.

      2) My old post will only be applicable for older version of GTM so in new GTM, you won’t need these anymore. Hope this helps.

  2. August 5, 2016
    Reply

    So… then I don´t need anymore old tags such Click Listener or Link Click Listener or Form Submit Listener from my old GTM (migrated automatically) in my new GTM?
    Can I delete them and all tags will works OK?
    If now it works with Choose Event inside triggers… choosing correct type (Click, Form Submit, etc.)…is it OK? Í don´t need old listener tags anymore?

    Thank you!

    • zinkohlaing
      August 5, 2016
      Reply

      Yes you are right, you don’t need them anymore

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.