When someone clicks an email link on your website, they are showing high intent to contact you. Yet many businesses track form submissions meticulously while ignoring email clicks entirely.
Tracking mailto link clicks in Google Tag Manager is straightforward. Once configured, you can send this data to GA4, Google Ads, and any other platform to measure and optimize for email-based leads.
This guide walks through the complete setup process.
Why Track Email Link Clicks
Email clicks represent valuable conversion signals.
High Intent Action
A visitor clicking your email address wants to contact you. This intent level sits between a page view and a form submission.
Mobile Behavior
Many mobile users prefer email over forms. Clicking a mailto link opens their email app directly, reducing friction.
Lead Attribution
Without tracking, you cannot attribute email leads to their traffic source. Google Ads cannot optimize for something it cannot see.
Complete Conversion Picture
If you only track form submissions, you undercount leads. Some visitors will always prefer email over forms.
How Mailto Links Work
Email links use the mailto: protocol. When clicked, they open the user’s default email client.
Basic Mailto Link
<a href="mailto:hello@yourcompany.com">Email Us</a>
Mailto with Subject Line
<a href="mailto:hello@yourcompany.com?subject=Website Inquiry">Email Us</a>
Mailto with Body Text
<a href="mailto:hello@yourcompany.com?subject=Inquiry&body=Hi, I found your website and wanted to ask about...">Email Us</a>
Google Tag Manager can detect clicks on any of these links by identifying the mailto: prefix in the URL.
Step 1: Enable Click Variables in GTM
Before creating triggers, enable the built-in click variables.
- In GTM, go to Variables
- Click Configure
- Enable these Click variables:
- Click Element
- Click Classes
- Click ID
- Click Target
- Click URL
- Click Text
These variables capture information about clicked elements, which we use to identify email links.
Step 2: Create the Email Click Trigger
Set up a trigger that fires only when someone clicks a mailto link.
Method 1: Click URL Contains mailto
- Go to Triggers → New
- Name it “Click - Email Link”
- Select “Click - Just Links”
- Choose “Some Link Clicks”
- Set condition:
- Click URL
- contains
- mailto:
- Save
This trigger fires whenever a user clicks any link containing mailto: in the href attribute.
Method 2: Click URL Starts With mailto
For stricter matching:
- Go to Triggers → New
- Name it “Click - Email Link”
- Select “Click - Just Links”
- Choose “Some Link Clicks”
- Set condition:
- Click URL
- starts with
- mailto:
- Save
Method 3: Using Regex for Multiple Conditions
If you need to match specific email addresses:
- Set condition:
- Click URL
- matches RegEx
^mailto:(sales|support|info)@yourcompany\.com
This only tracks clicks to specific email addresses.
Step 3: Create the GA4 Event Tag
Send email click data to Google Analytics 4.
- Go to Tags → New
- Name it “GA4 Event - Email Click”
- Select “Google Analytics: GA4 Event”
- Configuration Tag: Select your GA4 Configuration tag
- Event Name:
email_click - Add Event Parameters:
| Parameter Name | Value |
|---|---|
| email_address | {{Click URL}} |
| link_text | {{Click Text}} |
| page_location | {{Page Path}} |
- Set trigger to “Click - Email Link”
- Save
Cleaning Up the Email Address
The Click URL includes the mailto: prefix. To capture just the email address, create a custom variable.
- Go to Variables → New
- Name it “Email Address Clean”
- Select “Custom JavaScript”
- Enter:
function() {
var clickUrl = {{Click URL}};
if (clickUrl && clickUrl.indexOf('mailto:') === 0) {
// Remove mailto: and everything after ?
var email = clickUrl.replace('mailto:', '').split('?')[0];
return email;
}
return clickUrl;
}
- Save
Now use {{Email Address Clean}} instead of {{Click URL}} in your event parameters.
Step 4: Create the Google Ads Conversion Tag
Track email clicks as conversions in Google Ads.
First: Create the Conversion Action in Google Ads
- In Google Ads, go to Goals → Conversions → Summary
- Click “New conversion action”
- Select “Website”
- Choose “Manual” setup
- Configure:
- Name: “Email Link Click”
- Category: Contact
- Value: Assign a value (e.g., $25)
- Count: One conversion per click (recommended)
- Copy the Conversion ID and Conversion Label
- Save
Then: Create the Tag in GTM
- Go to Tags → New
- Name it “Google Ads - Email Click Conversion”
- Select “Google Ads Conversion Tracking”
- Enter Conversion ID and Conversion Label
- Set trigger to “Click - Email Link”
- Save
Step 5: Test the Implementation
Verify everything works before publishing.
Using GTM Preview Mode
- Click Preview in GTM
- Enter your website URL
- Navigate to a page with an email link
- Click the email link
- Check the Preview panel:
- “Link Click” event should appear
- Your email click tags should show as “Fired”
- Variables should show correct values
Checking Variable Values
In Preview Mode, click on the Link Click event and check:
- Click URL: Should show
mailto:email@example.com - Click Text: Should show the link text
- Email Address Clean: Should show just the email address
Verifying in GA4
- Open GA4 DebugView (Admin → DebugView)
- Click an email link on your site
- Look for the
email_clickevent - Check that parameters are populated correctly
Step 6: Handling Edge Cases
Real websites have variations that require additional handling.
Email Links in Buttons
Some sites wrap mailto links in button elements:
<button onclick="location.href='mailto:hello@company.com'">
Contact Us
</button>
This does not trigger “Click - Just Links” because there is no <a> tag.
Solution: Use “Click - All Elements” and match based on Click Element or the onclick attribute.
Dynamically Generated Email Links
JavaScript may generate email links after page load:
document.getElementById('email-btn').href = 'mailto:' + 'hello' + '@' + 'company.com';
Solution: GTM’s click tracking works on dynamically generated elements. Just ensure the final href contains mailto:.
Email Links in Iframes
Email links inside iframes from different domains cannot be tracked by your GTM container.
Solution: Work with the iframe source to implement their own tracking, or restructure to avoid iframes.
Multiple Email Addresses
If your site has different email addresses for different purposes:
<a href="mailto:sales@company.com">Sales Inquiries</a>
<a href="mailto:support@company.com">Customer Support</a>
<a href="mailto:careers@company.com">Job Applications</a>
Track them all with one trigger, but differentiate in reporting using the email address parameter.
Or create separate triggers and tags for each:
- Trigger: Click URL contains
mailto:sales@ - Trigger: Click URL contains
mailto:support@
Advanced: Extracting Email Components
For detailed analysis, extract parts of the mailto URL.
Variable: Email Domain
function() {
var clickUrl = {{Click URL}};
if (clickUrl && clickUrl.indexOf('mailto:') === 0) {
var email = clickUrl.replace('mailto:', '').split('?')[0];
var domain = email.split('@')[1];
return domain || '';
}
return '';
}
Variable: Email Subject
function() {
var clickUrl = {{Click URL}};
if (clickUrl && clickUrl.indexOf('subject=') !== -1) {
var subjectMatch = clickUrl.match(/subject=([^&]*)/);
if (subjectMatch) {
return decodeURIComponent(subjectMatch[1]);
}
}
return '';
}
Variable: Email Department
Map email addresses to departments:
function() {
var email = {{Email Address Clean}};
if (!email) return 'unknown';
if (email.indexOf('sales') !== -1) return 'sales';
if (email.indexOf('support') !== -1) return 'support';
if (email.indexOf('info') !== -1) return 'general';
if (email.indexOf('careers') !== -1) return 'hr';
return 'other';
}
Use these variables as event parameters for richer reporting.
Tracking Email Clicks as Micro-Conversions
Email clicks may not be your primary conversion, but they provide valuable signals.
Setting Conversion Value
Assign a value based on your average lead worth:
- If 10% of email clicks become customers
- And average customer value is $1,000
- Email click value = $100
Primary vs Secondary Conversions
In Google Ads:
- Go to Goals → Conversions → Summary
- Find your email click conversion
- Click to edit
- Set as “Secondary” if form submissions are primary
Secondary conversions appear in reports but do not affect Smart Bidding directly.
Using for Audience Building
Create audiences based on email clickers:
- People who clicked email but did not submit a form
- People who clicked sales@ vs support@
- Engaged users (email click + 3+ pages viewed)
Combining with Other Contact Tracking
Email clicks should be part of a complete contact tracking strategy.
Track All Contact Methods
- Form submissions
- Email link clicks
- Phone number clicks (tel: links)
- Live chat initiations
- Social media link clicks
Create a Contact Event
Push a standardized event for any contact method:
// For email clicks
window.dataLayer.push({
event: "contact_intent",
contact_method: "email",
contact_target: "sales@company.com",
page_location: window.location.pathname
});
// For phone clicks
window.dataLayer.push({
event: "contact_intent",
contact_method: "phone",
contact_target: "555-123-4567",
page_location: window.location.pathname
});
Create a single GA4 event tag triggered by contact_intent with method-specific parameters.
Reporting on Email Clicks
Once tracking is live, analyze the data.
GA4 Reports
- Go to Reports → Engagement → Events
- Find
email_click - Click to see event parameters
- Analyze by email address, page, or other dimensions
Create Custom Explorations
- Go to Explore → Free form
- Add dimensions: Page path, Email address
- Add metrics: Event count, Users
- Analyze which pages generate the most email clicks
Google Ads Reports
- Go to Goals → Conversions
- Find “Email Link Click”
- Segment by Campaign, Ad Group, or Keyword
- Identify which ads drive email conversions
Common Issues and Fixes
Trigger Not Firing
- Check that the link uses
<a href="mailto:...">format - Verify Click URL variable is enabled
- Test in GTM Preview Mode
- Check for JavaScript preventing default link behavior
Double Counting
- Ensure only one tag fires per trigger
- Check that trigger conditions are specific enough
- Verify no duplicate triggers exist
Missing Email Address in Reports
- Check that the variable correctly extracts the email
- Verify parameter names match between tag and reports
- Confirm the event is not being filtered
Click Tracking Blocked
Some browsers or extensions block click tracking. Server-side tracking can help capture more data, but client-side tracking will always miss some events.
Key Takeaway
Email link clicks are high-intent actions that deserve tracking. Setting up mailto click tracking in GTM takes minutes and provides valuable conversion data.
Create a link click trigger targeting mailto: URLs, fire GA4 events and Google Ads conversion tags, and extract the email address for detailed reporting.
Combined with form submissions and phone click tracking, email tracking gives you complete visibility into how visitors want to contact your business. The more conversion signals you capture, the better your campaigns can optimize.
Related Posts
How to Track WhatsApp Clicks in Google Tag Manager
9 min read
WooCommerce Google Ads Conversion Tracking via GTM Using GTM4WP
14 min read
How Google Tag Manager, GA4, and Google Ads Work Together
7 min read
Need Help With Your Google Ads?
I help e-commerce brands scale profitably with data-driven PPC strategies.
Get In Touch