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:

11 Responses
Steve jay
11|Mar|2009 1Thanks Jeff, just what I needed.
Ruben
29|Apr|2009 2Thank you Jeff !
Maybe you can help me with the tracker for email form. It’s kind of basic but the problem is that I have on my website many email and so many mail form.
Google says to right something like that onsubmit=”pageTracker._linkByPost(this)”
But do you know if I can have someting like that onsubmit=”pageTracker._linkByPost(‘EMAIL/my@email.com’)” ??
Best Regards
admin
30|Apr|2009 3Yes, you can basically put whatever you want in that (this) section. Then you just have to setup a goal in Analytics to look for (this).
Ruben
07|May|2009 4Thank you very much
Laurie
19|Mar|2010 5Thank you for the article.
Just curious how would you go about tracking a mailto link like this?
Email: admin at thisbusiness dot com dot au (email us)
ps: This Business is just a fictitious business name.
Any help would be appreciated.
admin
19|Mar|2010 6I guess I don’t understand your question. You’d simply replace your contents with the contents in the example.
Randy
22|Jul|2010 7Thanks, just what I was looking for!
David
15|Dec|2010 8Hi Jeff,
Thanks for the info and this works perfectly.
I would also like to track the same mailto conversion in our adwords account, would you know if this is possible and how we would be able to do this?
Many thanks
admin
15|Dec|2010 9If you link your adwords account to your analytics account & create the goal in Analytics it will work. Once adwords recognizes the goal you can then link to it as your conversion goal from in Adwords. It takes a certain number of conversions before this will happen and that detail I don’t recall but if you dig you should find it. Just login to adwords and click on reporting and you’ll find out about it in there. Good Luck!
Nick
31|Mar|2011 10Great article Jeff. I tried to implement.. not having much luck yet. Should you be able to see these as actual page views in your top content report if you were to search for “mailto”?
admin
31|Mar|2011 11@Nick this actually doesn’t work anymore if you’re using the new asynchronous GA code. Sorry, I just haven’t had time to update the post.
Leave a reply
Search
My Twitter Feed
Recent Posts
Categories
© 2011 site by Jeffrey Nichols