Paul Galvin's (old) SharePoint space [SharePoint

Just another WordPress.com site

Capturing “mailto:” Metrics

I’m on a project where we need to collect metrics around a function named "Share a Story."  The idea is very simple — if you’re looking at an interesting article on the intranet and want to share it with someone, click a link labeled "Share this story" email it to your buddy.

We played around with a custom form for this purpose, but in the end, common sense won the day and we just use the familiar <a href=mailto:…> technique.  (<a href mailto:…> is a surprisingly robust little bit of HTML; as a bonus, that link brings me back to my old UNIX man pages days; those were the days!).

This technique provides a great interface for end users since they get to use their familiar MS Outlook client (or whatever email client they have installed).

It makes things harder on us poor developer types since they client *also* wants to run a report in the future that shows how often users share stories and even which stories are shared most often.

We whiteboarded a few potential solutions.  My favorite is to carbon copy (CC) a SharePoint list.  That way, the end user still gets the outlook client while we get to capture the event because we’ll get a copy of the email ourselves.  There are some obvious drawbacks.  The main problem is that the user could simply blank out or otherwise mangle the CC address.  And, we need to manage that event library of emails.  We have a scheduled job on the white board responsible for that cleanup.

If you have some clever approach to solving this problem, please do tell.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Advertisements

5 responses to “Capturing “mailto:” Metrics

  1. Daniel March 10, 2009 at 8:47 pm

    How about using javascript (with a tool like JQuery) to catch the user click event on the link. This would fire off an ajax call (again easy to do with jquery) that could log the username, or anything else that you want. I guess the only problem is then you don\’t *really* know if the email was sent or not.

  2. Paul March 10, 2009 at 8:51 pm

    Daniel, that\’s another option on the white board. The risk is like you say — what happens if the user cancels the action? It\’s technically harder too since we need to write some web service for the javascript to call into. What would an href link like that look like? <a href="javascript:[stuff goes here]> … hows does that work? Thanks for the suggestion!

  3. Daniel March 10, 2009 at 9:21 pm

    I would have a link like:<a href="mailto:test@test.com" id="mailLink" >Mail</a>and use jquery like:$("mailLink").click(function() { $.post(/*do ajax call*/) });Just replace $.post (http://docs.jquery.com/Ajax/jQuery.post) or $.ajax (http://docs.jquery.com/Ajax) with code to do the ajax call.

  4. Unknown March 11, 2009 at 5:16 am

    How about this?* Create the send to link that links to a _layouts page and add the current page to the querystring.* On the _layouts page, write the usage info to a Sp List or a DB table.* Use the Outlook.Application namespace to create the message and then use objMail.Display() to open a new mail message in outlook – see http://forums.devx.com/showthread.php?threadid=152716* Then server.transfer back to the original page or to a thank you window

  5. Chunmun March 12, 2009 at 5:16 am

    Hi Paul, If requirement is to just capture the number of time user share the article then Just create 1 custom meta field in the list and when user click on Share a Story link then call 1 javascript function in which developer write a code on that code generate asynchornous call using XMLhttpRequest object and increment the counter by 1 of that article . If developer is working on custom web part then he will cretae Server side Hyperlink type control and execute their code and increment the count by 1 of that article and open the outlook.and If requirement is to capture all the details like recipient list , date , edited message then this option will not work , then developer need to create a webpage which look like OUTLOOK interface and capture all details on Send button code

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: