Can I track clicks on a mailto link?
I'd like to be able to track the number of clicks on a mailto link and wondered if this is possible in WebLog Expert? If so, do you know what code I should add to the page/link to get this to work?
For example, you can use the following code:
<a href="mailto:test@test.com" onclick="(new Image()).src = 'http://www.yoursite.com/mailto.html?mail=test@test.com';">test@test.com</a>
You also need to create an empty file mailto.html on your server. After it you can enable the Access Statistics > Pages and Queries report and view statistics on all queries for this file that will include the email clicked.
The only downside is that some duplicate clicks won't be logged as browsers will cache the response (e.g. for /mailto.html?mail=test@test.com). It is possible to avoid the issue by creating a bit more complex script and using custom tables (it requires the Professional or Enterprise edition) - if you wish, I can provide more information on how to do it.