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:

7 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!
Leave a reply
Search
My Twitter Feed
Recent Posts
Categories
Meta
Copyright © 2008 - SEOjeff.com - is proudly powered by WordPress