If you wish to track the clicks of a mailto link in Google Analytics as a Goal Conversion then read on. First, you’ll need to edit the HTML used to create your mailto link. It should start out looking something like this:
<a href=”mailto:email@address.com”>Email Me Now</a>
Edit your HTML to look like this (depending on which version of the Google Analytics tracking code you use):
For GA.js:
<a href=”mailto:email@address.com” onClick=”javascript:pageTracker._trackPageview(’/mailto/agent-email’);”>Email Me Now</a>
For urchin.js:
<a href=”mailto:email@address.com” onClick=”javascript:urchinTracker (’/mailto/agent-email’);”>Email Me Now</a>
(If you’re not sure if you’re using GA.js or urchin.js look at your Analytics snippet which should be located just before the </body> tag at the bottom of your webpage.)
In the above example /mailto/agent-email can be anything you want it to be. Just be sure to make a note of it because you’ll need it when setting up the Goal.
To setup the goal, open the profile in Google Analytics and click on Edit in the settings column. Next, click Edit next to the Goal you’d like to configure. It should look like this:

Leave a reply