Track click on all external link via GA/GTM

Hi,

I have a lot of items of CMS collections on my website with an external link/button.

I would like to track the number of click on each link.

How can I do to automatically set a unique GA/GTM click event on all the links of my items of my collections ?

Example page: Podcasts pour Product Manager - Jesuispm.com

Thank you :slight_smile:

Hey @Florent_Isidore, you should be able to do this on GTM. Its been awhile since I use it so you have to explore a lil bit.

Create a Tag with something like this.

You may want to add a custom variable so you know which button exactly was clicked. You might also want to filter the Link click trigger.

Hi @dennyhartanto, thank for your answer and your help.

So now, I have a GA event on all external link click. But how can I do to collect additional data like the clicked url?

I think it’s there but I dont understand how it works, any idea?

You can enable a GTM Variable for Link URL.

Variables > Configure > Find ‘Click URL’

And in your GA settings, where it says Label you can use {{Click URL}}

Thank a lot ! It works now.

I’ve also found my answer on this french article: https://www.1ere-position.fr/blog/tracker-liens-sortant-google-analytics-gtm/