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?
1. Download file http://www.weblogexpert.com/files/tra..., rename it to mail_tracker.gif and place it to the root folder of your site.
2. Modify mailto links on your site like the following:
<a href="mailto:test@test.com" onclick="(new Image()).src = '/mail_tracker.gif?mail=test@test.com&r=' + Math.random().toString().slice(2, 10);">test@test.com</a>
3. Add a new table in WebLog Expert in Options > Report > Tables. On the second page vhoose "Query parameter value" as main data, click the "Custom..." button to the right of it and enter "mail" (without quotes) as parameter name. Choose "Hits" and "Visitors" columns.
On the next (filter) page add an include "Requested file" filter with value /mail_tracker.gif*
After it you'll be able to get reports on mailto clicks in a separate table.
If you have multiple links to be tracked, it is better to use a script to add the onclick event automatically to all mailto links without need to add it manually. If you use jQuery, you can use the following script: