9. 12. 2023
Google Analytics + Tag Manager

Tracking click event on email and phone links in Google Analytics using GTM

In the basic events we can track on our website is the count of clicks on e-mail and phone links. It will give us a nice overview of how many new contacts we have managed to establish thanks to the website. In this article, we’ll show you how to set up this tracking very easily without having to intervene in the code using Google Tag Manager and transmit a click event to Google Analytics.

The trigger for clicking on e-mail address links

In Google Tag Manager, we start in the Triggers section, where we click on Create new. Name the trigger Email Click, select Click – Just Links as the Trigger type. To run the trigger, select the Some Link Clicks on links option and set the condition for Click URL – starts with – mailto:. Due to this condition, the trigger is fired only for e-mail addresses links, which in the HTML code normally have the form “mailto: info@example.com”.

Trigger configuration to track an email link click event in Google Analytics

The trigger for clicking on phone links

Similar to e-mail links, we will also set a rule for clicking on links with a phone number, which we will name, for example, Phone Click. Only in the Click URL condition do we set a filter for links starting with tel:.

Trigger configuration to track a phone link click event in Google Analytics

Event submitting to Google Analytics

In order to see the count of clicks on a given link in the Google Analytics Event Report, we need to create a tag to do so. We name the tag Email Click Event, we choose the type of tag Google Analytics: Universal Analytics and the type of tracking Event. We set the event measurement parameters to:

  • Category: email
  • Action: {{Click URL}}
  • Label: {{Page Path}}

Next, we will fill in the Google Analytics Settings, where it is necessary to enter the ID of our Google Analytics service for the given website. You can fill in the ID directly or select the prepared variable {{Google Analytics ID}} (if you have created one).

Lastly, we will set the Firing Triggers, where we will choose our newly created Email Click rule.

A tag to measure a link click event in Google Analytics

Similarly, we can set up event measurement for clicking on phone numbers.


Leave a Reply

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