Last updated 26 November 2026. By Paul Badarau.
A fictional illustrator's portfolio has an email address in the footer and a phone number on the contact page. Both are links. A click opens a mail app or a dialer and loads no page on the site, so the pageview report never sees it. The illustrator wants to know which sources bring the people who get in touch.
- In Analytics, open the Project's goals and add two goals with the matching rule Named event:
email_clickandphone_click. An event name is 1 to 40 lowercase letters, digits and underscores. Owners and Administrators can add goals. - Add a click listener to every page that has the links, in your own script file or an inline script:
document.addEventListener("click", function (e) { var link = e.target.closest('a[href^="mailto:"], a[href^="tel:"]'); if (link && window.postdeploy) postdeploy.track(link.protocol === "mailto:" ? "email_click" : "phone_click"); }); - Deploy, click each link once on the live site, and open the Project report for Today. Each goal should show one completion.
The listener sits on the whole document, so it also catches links you add later, and you never edit the links themselves. The window.postdeploy check stops the listener from throwing an error when a blocker has stopped the Analytics script.
Create the goals before you deploy the listener. The collector refuses an event whose name is not a goal of the Project, so clicks sent earlier are lost.
After a few weeks, compare each goal's rate by source and by page in PostDeploy Analytics. The rate divides the visitor-days that include a click by all visitor-days in the same range and filters. A visitor who clicks the email link three times in a day counts three times in completions and once in the rate.
A click shows intent. It does not prove that an email was sent or a call was made. People who copy the address by hand are not counted, and on a computer with no calling app a tel: link may open nothing. To know how many messages arrived, count them in your inbox. Use the goal to compare sources and pages.
The product page for this is Analytics.