Home Contact Blog What Who Why

How to set up an email tag in Tag Manager and Analytics

This article provides a short guide to tagging an email address on your website using Tag Manager. This will enable you to measure the number of clicks the email address receives through Google Analytics and identify the page path. While Google provides lots of information on Event tagging, I found few step-by-step guides for the latest Tag Manager version. Hopefully, this guide will get you tracking email events in a matter of minutes. 

Note: This guide assumes you have already set up an account in Tag Manager and Google Analytics. That you have added Tag Manager and Analytics code to your website and know your Google Analytics tracking code number. 

Step 1: Enable all "Click" variables within Tag Manager if not done already

Go to your Tag Manager account and click "Variables" in the left side menu. 
The previous Tag Manager came with the Built-In Variables already displayed on the screen. In the new version, you need to enable them if you have not done so already. You'll need the click variable "Click URL" active to set up an email tag however it makes sense to enable all click tags as you will need them at some point. 

Tag Manager Variables.png


Step 2: Create a Google Analytics ID variable if you have not done so already

Create a new variable for your GA Tracking ID so that you don't have to keep adding it. Create a new variable by going to User Defined Variables and clicking "new", selecting Google Analytics settings and adding your tracking code. (Your tracking ID can be found in Google Analytics > Admin > Tracking code) 

Step 3: Create a new Trigger

Create a new Trigger and name it "Mailto Link Trigger" or similar name. Select trigger type "Just links". Complete the form as photo shows. 
The command matches regX .* means the tag should fire on every page. You can use page path label to understand which page fired the event.

Tag Manager Trigger.png


Step 4: Create a Tag 

Create a new Tag and name it "GA – Event – Mailto" or similar name. Choose Tag Type "Google Analytics – Universal Analytics". Set Track Type to "Event", Category as "Mailto" and Action as "Click". 
Choose Label as an existing variable {{Page Path}} and Google Analytics settings at you GA variable you set up in step 2. Set the trigger up as the trigger you created in step 3. 

Tag Manager Tag.png


Step 5: Preview your tag 

Use Tag Manager preview mode to check that your tag is firing. Select preview mode and access your site. The preview mode pane should be open at the bottom of your screen, if not, refresh the page. To check a tag is working, find an email link on your website and hit control and click. A mailto trigger fire should be recorded. You can also visit Google Analytics > Real-Time section > Events where you should see that the email event has been recorded in GA. 

Step 6: Celebrate and watch those stats coming in!

If you are happy with preview and analytics that the trigger is firing and recording correctly. Hit "Publish" in Tag Manager to submit and share your new tagging. You can then monitor email events across the site and see which pages are leading to the most event action.