In short
Many visitors do not fill in a form: they call or write directly. Tracking phone and email clicks means sending an event to the analytics tool every time a visitor taps a tel: or mailto: link. Once this is done, you can see which pages and which sources, organic search and AI assistants included, trigger these contacts.
Why it matters
For a tradesperson, a professional practice or a local shop, the phone call is often the first conversion, ahead of the form. On mobile, a clickable number opens the dialer directly: without measurement, these contacts appear nowhere in the analytics tool, and the pages that generate them seem to bring in nothing.
No tool measures these clicks reliably by default. GA4's enhanced measurement tracks outbound clicks to other domains, but its documentation does not mention tel: and mailto: links: do not rely on it. Matomo, for its part, documents tracking mailto: links with a manual call. The reliable solution is a dedicated event.
A click is not a call. The visitor may hang up, make a mistake or copy the number without clicking; on a desktop computer, a tel: link sometimes opens nothing. Treat these events as contact intent, and leave the measurement of completed calls to call tracking tools.
What it improves
- A complete view of contacts The pages that make people call finally appear in reports, alongside forms.
- Local SEO City or service pages are judged on the contacts they trigger. The number must first be displayed properly: see enter the phone number (opens in a new tab).
- AI traffic Visitors sent by an assistant who call right away become visible.
- Choice of placement Compare the header, the footer and the floating mobile button.
- Rankings No effect.
How to check
- List the links: open the browser's developer tools on the home page and on a service page, then run in the console:
[...document.querySelectorAll('a[href^="tel:"], a[href^="mailto:"]')].map((link) => link.href);
Every displayed number must be a tel: link in international format (tel:+33240000000).
- Click each link with Tag Assistant or Tag Manager's preview connected: a dedicated event must be sent on each click.
- Check reception in GA4's
Admin > Data display > DebugView, or in Matomo's visits log. - Check the parameters: the link's location is filled in, and no visitor email address appears.
How to implement
Before you start
Set a naming convention, the same across all your sites:
| Action | GA4 event | Parameters | Matomo event (category, action, name) |
|---|---|---|---|
| Click on a number | click_phone |
link_location: header, link_number_id: standard |
Contact, telephone, header |
| Click on an email address | click_email |
link_location: page_contact |
Contact, email, page_contact |
| Click on WhatsApp | click_whatsapp |
link_location: bouton_flottant |
Contact, whatsapp, bouton_flottant |
GA4 has no recommended event for these clicks: the names above are a convention. Keep them lowercase, without accents, under 40 characters.
To know the location, add a data-location attribute to the links in your templates:
<a href="tel:+33240000000" data-location="header">02 40 00 00 00</a>
<a href="mailto:[email protected]" data-location="page_contact">[email protected]</a>
Good to know: Google Analytics policies prohibit sending personally identifiable information. The company's generic address is not such information, but to be safe do not send the address itself: an identifier (
standard,sav,agence_nantes) is enough to distinguish your lines and mailboxes.
With Google Tag Manager
Variables > Configure: enable the Click URL, Click Element and Click Text built-in variables.- Create a “Custom JavaScript” variable named
Click Location:
function () {
var element = {{Click Element}};
var link = element && element.closest ? element.closest('a') : null;
return link ? link.getAttribute('data-location') || 'non_renseigne' : 'non_renseigne';
}
- Create a
Click - Just Linkstrigger, “Some Link Clicks”, conditionClick URLstarts withtel:. Leave “Wait for Tags” unticked: the link does not leave the page. - Create a “Google Analytics: GA4 Event” tag, event name
click_phone, parameterlink_location={{Click Location}}, fired by this trigger. - Duplicate the trigger and tag for
mailto:(click_email) andhttps://wa.me/(click_whatsapp). - Preview, click each link, then publish.
With GA4 and gtag.js
Without Tag Manager, a single listener covers every link, including those added after the page loads:
document.addEventListener('click', (event) => {
const link = event.target.closest('a[href^="tel:"], a[href^="mailto:"]');
if (! link) {
return;
}
const eventName = link.href.startsWith('tel:') ? 'click_phone' : 'click_email';
gtag('event', eventName, {
link_location: link.dataset.location || 'non_renseigne',
});
});
Load this script after the Google tag, on every page. To read link_location in reports, create a custom dimension with the “Event” scope in Admin > Data display > Custom definitions.
With Matomo
The same listener, with a Matomo event:
document.addEventListener('click', (event) => {
const link = event.target.closest('a[href^="tel:"], a[href^="mailto:"]');
if (! link) {
return;
}
const action = link.href.startsWith('tel:') ? 'telephone' : 'email';
window._paq = window._paq || [];
window._paq.push(['trackEvent', 'Contact', action, link.dataset.location || 'non_renseigne']);
});
To make it a goal: Goals > Manage Goals > Add a new goal, “Send an event” trigger, category Contact, action telephone. With Matomo Tag Manager, the principle is the same: a click trigger filtered on the link URL and a Matomo event tag.
WordPress
Versions WordPress 6.4 and later.
If Tag Manager is installed, follow the Tag Manager section: nothing to code in WordPress. Otherwise, add the gtag.js or Matomo listener to the child theme:
// wp-content/themes/your-child-theme/functions.php
add_action('wp_enqueue_scripts', function (): void {
wp_enqueue_script(
'contact-clicks',
get_stylesheet_directory_uri() . '/js/contact-clicks.js',
[],
'1.0.0',
['in_footer' => true, 'strategy' => 'defer'],
);
});
Put the code from the gtag.js or Matomo section in js/contact-clicks.js. Page builders (Elementor, Divi) and Button blocks accept a tel: link; the data-location attribute is added through the “Custom attributes” field when the builder offers one, otherwise the Click Location variable returns non_renseigne and you at least keep the count.
Shopify
Versions Shopify admin and Web Pixels API, all plans, November 2026.
A custom pixel does not see the page directly, but it receives the clicked DOM event, with the href attribute of the clicked element. In Settings > Customer events > Add custom pixel, after your tool's loading code:
analytics.subscribe('clicked', (event) => {
const href = event.data.element?.href || '';
if (href.startsWith('tel:')) {
gtag('event', 'click_phone', { link_location: 'boutique' });
}
if (href.startsWith('mailto:')) {
gtag('event', 'click_email', { link_location: 'boutique' });
}
});
The code that loads gtag in the pixel is described in Shopify's help on custom pixels. If GA4 already goes through the Google & YouTube channel, this pixel must send only these two events, no page view, otherwise pages would be counted twice.
Laravel
Versions Laravel 11 to 13.
Centralize the link in a Blade component to guarantee the international format and the location attribute:
{{-- resources/views/components/phone-link.blade.php --}}
@props(['location'])
<a href="tel:{{ config('company.phone_e164') }}" data-location="{{ $location }}">
{{ config('company.phone_display') }}
</a>
Usage: <x-phone-link location="header" />. The phone_e164 and phone_display values are declared in a config/company.php file. Add the gtag.js or Matomo listener to the site's JavaScript bundle (resources/js/app.js).
Next.js
Versions Next.js 15 and 16 (App Router).
'use client';
import { sendGAEvent } from '@next/third-parties/google';
export function PhoneLink({ location }: { location: string }) {
return (
<a
href="tel:+33240000000"
onClick={() => sendGAEvent('event', 'click_phone', { link_location: location })}
>
02 40 00 00 00
</a>
);
}
With Tag Manager, keep plain links with data-location: the “Just Links” trigger also works on pages rendered by React.
Should it be a key event?
Mark click_phone as a key event if the phone is your main sales channel (repair services, restaurants, healthcare). Leave click_email as a regular event if emails are mostly customer service questions. In both cases, keep the default counting method “Once per event” and read the figures as intent.
To measure calls that actually went through, you need a call tracking tool, which displays forwarding numbers and counts the calls received. Google Ads offers this kind of tracking to its advertisers; check its availability and conditions in the Google Ads help.
Common mistakes
- Numbers displayed as plain text: not clickable, they cannot be measured and they inconvenience mobile visitors.
tel:links with spaces or dots (tel:02.40.00.00.00): some phones misinterpret them. Use the international format without separators.- Relying on enhanced measurement's outbound clicks: GA4's documentation does not cover
tel:andmailto:. - “All Elements” trigger: a click on the icon inside the link does not carry the URL; “Just Links” goes up to the
<a>tag. - Sending the visitor's email address or number in a parameter: prohibited by Google Analytics policies.
- Presenting clicks as calls in a management report.
- Forgetting the floating mobile button or the footer number, often added by a plugin that lacks the
data-locationattribute.
Frequently asked questions
Does GA4 automatically track clicks on tel: and mailto: links?
Do not rely on it. GA4's enhanced measurement tracks clicks to other domains, and its documentation does not mention tel: and mailto: links. For reliable, readable measurement, create a dedicated event, for example click_phone, with Tag Manager or a small gtag.js script, and add a parameter that indicates where the link sits on the page.
Is a click on a phone number a call?
No. A click on a tel: link opens the phone's dialer, but the visitor may give up, press the wrong key or call later by copying the number. On a desktop computer, the click sometimes opens nothing. So read these events as contact intent. To count the calls actually received, use a call tracking tool with forwarding numbers.
Should phone clicks be marked as key events?
Yes, if the phone is your main sales channel, as for a repair service or a restaurant: these clicks are then the indicator closest to actual demand. If calls are mostly about customer service, keep a regular event so as not to inflate your conversions. In every case, state in your reports that these are clicks, not completed calls.
Can phone clicks from the Google Business Profile listing be tracked?
Not in your analytics tool: a call started from the Google listing does not go through your site. Google Business Profile performance data show the number of calls made from the listing. Compare them separately with the clicks measured on the site, without adding them up, because the same customer may have used both.
Resources
- Google Analytics Help: Enhanced measurement eventssupport.google.com
- Tag Manager Help: Click triggerssupport.google.com
- Google Analytics Help: Best practices to avoid sending personally identifiable informationsupport.google.com
- Matomo: JavaScript tracking guide (
trackEvent, links)developer.matomo.org - Shopify:
clickedevent of the Web Pixels APIshopify.dev - MDN:
tel:andmailto:linksdeveloper.mozilla.org
Updated on
Topic checklist (PDF)