How to Track Email Link Clicks in Google Analytics 4 (GA4)
Updated: May 11
If your business is one that heavily relies on Email leads, putting in place tracking for Email Link Clicks would certainly be a good idea. Essentially, you would be able to know how many people come to your website and click on a link that opens up to your Email address. In this guide, we will show you a step-by-step tutorial (with screenshots!) on how to track Email Link Clicks in Google Analytics 4. Let's get started!
Here's a 15-minute video tutorial you can follow from XYZ Lab's Youtube Channel!
Are you looking to learn more about Google Analytics 4?
Sign-up for the Google Analytics 4 Fast Track Course! 🚀 or
What you need to get started to track Email Link Clicks in Google Analytics 4
In this article, we will show you how to register an event that is going to track how many times a user that comes to your website and clicks on an Email link. We are going to use the website and email sample below for this tutorial. Now, before we get started, there are some prerequisites and tools that you need to prepare.
Prerequisite 1: Make sure your GA4 account is correctly set up on all website pages
In case you haven't already, you can set up your GA4 account using this Google Analytics 4 Tutorial. For the purpose of this tutorial, we will be using the Google Merchandise Store's demo account as an example.
Prerequisite 2: Set up a Google Tag Manager account
You can head on to https://tagmanager.google.com/ and follow this Google Tag Manager Tutorial to set up an account and a container. For the purpose of this tutorial, we will be using a real account and website as an example.
Prerequisite 3: Install your Google Tag Manager Container on all website pages
We have covered these steps in a previous tutorial which you can find here: Youtube Tutorial and Article Guide (Step 1). Otherwise, you can also follow the steps below to install the Google Tag Manager Container on all website pages:
1. Click on Admin and select Install Google Tag Manager.
2. Copy the tracking codes and install them on every single page of your website.
Once you have installed everything, we can start setting up the Email Link Clicks tracking!
How to track Email Link Clicks in Google Analytics 4
Step 1: Enable all Click Variables and Publish your Tag Manager
We have covered these steps in a previous tutorial which you can find here: Youtube Tutorial and Article Guide (Step 3). Otherwise, you can also follow the steps below to enable the click variables on Google Tag Manager:
1. Access Google Tag Manager.
2. Click Variables.
3. Click Configure.
4. Scroll down and find Clicks. Enable all the options that are relevant to Clicks (all Clicks variables).
5. Submit and Publish the changes.
Step 2: Set up the Tag
1. Navigate to your GTM account. Click on Tag.
2. Name the Tag.
3. Click on Tag Configuration.
4. Select the tag type: Google Analytics: GA4 Event.
Step 3: Provide your GA4 Measurement ID
1. If it's your first time setting up, you will have to Manually Set ID and provide your GA4 Measurement ID.
2. Navigate to your GA4 Account. Click on Admin.
3. Navigate to Property (second column). Click on Data Streams.
4. Click on your property.
5. Copy the Measurement ID.
6. Paste the Measurement ID.
Step 4: Name your Event
Name the event accordingly, as it will show up in the GA4 reports. Do not add a space in between and always use an underscore like so: action_name (e.g. clicks_to_email).
This is how it will appear in the GA4 reports:
Step 5: Create a new Trigger
Triggering determines when the tool is going to be active on the website. To configure the trigger:
1. Click on Triggering
2. Click + symbol to create a new trigger.
3. Name the trigger.
Step 6: Select "Just Links" for the trigger type
Click on Trigger Configuration and select the trigger type: Just Links.
The Just Links trigger type is used to track an event that corresponds to an external URL (user clicks and leaves to an external URL). We use Just Links because if the user comes to the website and clicks on the Email link, the system opens up an Email client (e.g. Outlook, etc).
Step 7: Select "Some Link Clicks" for Trigger Configuration
Since we want to track the specific click that links to a specific Email client, we don't want to track All Link Clicks but only Some Link Clicks.
Step 8: Select "Click URL" from the dropdown menu
Click URL is the specific URL that the user will get redirected to after they click the button.
As you can see in this example, when a user hovers/ clicks on the Email link (email@example.com), an Email address appears on the bottom left-hand side (mailto:firstname.lastname@example.org). This is the Click URL, which is the link that will open the Email client every time somebody clicks on the hyperlink. Now, we want to create a condition that tracks the action with a Click URL that contains/equals this specific address.
Step 9: Paste the Link Address (Email Click URL)
1. Copy the Email address.
2. Paste the Email address in the box.
Notice that there is a dropdown option for the conditions. You can do a Click URL equals [complete link address], which means it will only get triggered if the specific URL is visited, or Click URL contains [partial link address], which means it will be triggered if any link that contains the partial link address is visited. Both work largely the same and you can choose the method that suits you. In this case, if you use contains, you only need to input the Email address without including the mailto:. If you use equals, then you need to include the whole mailto:emailaddress.
Step 10: Save the Tag Configuration
This is how the completed Trigger Configuration should look like. This is how we define a unique click and tell the system that we want to track the specific click. The Tag will only send information back to Google Analytics when someone clicks on the element with the exact parameter we have set up. Don't forget to save the tag configuration.
In this case, we have created a GA4 event with the name Clicks to Email that will live in the specific GA4 data stream, and the event will only be triggered when a user goes to our website and clicks on a link that goes to the specific URL (email URL text).
Step 11: Submit and Publish Container
How to verify that the Event setup is correct
Step 12: Preview your Tag Manager
Step 13: Connect Tag Assistant to your website
Copy the URL where the element we want to track lives and connect it to the Tag Assistant.
Two tabs will automatically open:
1. Tag Assistant
2. Website connected to the Tag Assitant (debugger view)
Step 14: Click on the link you want to track on the debugger view
Step 15: Navigate to Tag Assistant and select the Link Click instance relevant to your outbound click
We can see the new instance of the link click on the sequence. Click on the recent Link Click.
Step 16: Check if your Tag is firing correctly
Here we can see the tags fired, including the GA4 event we just set up and tested which is called Clicks to Email.
Click on the Clicks to Email Tag. It will show the details of why the tag was fired. You can see here that the tag is fired because a user clicked on an element that contains the specific Click URL (Email address), which means the event is working as expected.
Step 17: Publish your Tag Manager
Congratulations, you're done with the setup! To note, it might take 24 hours for the event to start functioning properly and show up in your GA4 account.
For some additional note, if you have the same email link on other web pages, you do not need to repeat these steps. Regardless of which page the user is on, whenever someone comes to your website and clicks on the specific element that has the Click URL containing the defined string of text (URL address), then the system will register an event in GA4. That's how you can find out how many people come to your website and click on the element to Email you.
However, note that this is only a click to initiate Email correspondence. From there, the user will still have to write the actual Email and send it. You can only track when someone clicks on the Email link and start the process of conducting the business, but you cannot track whether the user completed the process and indeed sent you an email. Nevertheless, tracking whether users are interested in initiating a conversation with your business when they reach your website is still very important, so we hope you found this guide helpful in managing the setup!