3

I'm using rails 2 for this app, with ActionMailer, but this is a general question about emails.

When we send out emails, i save a record corresponding to the email in a database table. I'd like to keep track of whether people have read the emails, and am wondering the best way to do it. On initial googling, it seems like i've stumbled into an ongoing battle between spammers and email clients!

My first thought was to use the "read receipt" header, but i know that this isn't supported by a lot of clients and is therefore unreliable. After that, i read of the tactic of including an image in the mail, and of detecting that image being loaded. I was thinking that i could put a parameter with the email record's id in the image url, so that when i get a request for that image i can see if it has a (for example) email_id param and if so, mark the corresponding email as having been read.

But, then i remembered that many clients are wise to this tactic and specifically ask the viewer of the mail if they want to display images. Obviously they might say no.

Am i right in thinking that i can't pull in other resources, such as stylesheets, in my mail? Because if i can pull them in, i could do that same trick but with the stylesheet rather than an image.

Grateful for any advice, max

Max Williams
  • 32,435
  • 31
  • 130
  • 197
  • 1
    The reason "many clients are wise to this tactic" is they think their users don't want to have their email reading tracked. They may well be right. Don't do this. – The Archetypal Paul Jul 18 '11 at 16:42
  • @Paul - i know where you're coming from, but i think many of our users wouldn't care. We have a subscriptions-only user base, so everyone who is getting an email has already paid to use the site, or has had someone else pay on their behalf. It's not like we're spamming a load of people who've never heard of us. – Max Williams Jul 18 '11 at 16:51
  • The problem is if there is another technique, people who your users do not want to allow to track their email reading will use it too. @Dave Swerksy's technique is probably as good as you'll get but it's still a bit creepy... And if yuu only think they wouldn't care, are you planning to ask them and only track the users who opt in? – The Archetypal Paul Jul 18 '11 at 18:11
  • @Paul no i'm not :) But, ask them what exactly? "Do you mind if we are notified when you open this mail? Actually we already have been." - that's just confusing. One issue is that our users are all school teachers, and while they are all no doubt smart people, many of them are technically quite naive. Questions like the above will generally just cause confusion. – Max Williams Jul 19 '11 at 08:39
  • I'm really not convinced by a response that says you're not going to ask if your readers mind you snooping on their email reading becasue they might get confused. The excuse of dubious marketers everywhere. However, they're your customers, if you are comfortable they have given (implied) permission, go ahead :) – The Archetypal Paul Jul 19 '11 at 10:22

3 Answers3

1

Bit late on this, but we've got a similar problem.

We're tracking the links to our site that are included within the email. We're doing this by, like you, having a DB record per email sent out. We've generated a unique hash key per email and are including that as a parameter on all the links included in the email.

We simply then have a before_filter that looks for the parameter and records the fact against the correct email record by using the unique hash to identify the correct one.

We use a unique hash key (rather than the DB's primary key) just so it is a little bit more secure / reliable.

Obviously this method only helps us track the clicks our emails have generated (and not if they've been read) but it is still useful as we can see which of ours users has clicked on which links.

ChrisW
  • 332
  • 3
  • 7
1

Externally-hosted stylesheets are generally treated the same way as images. The client will not download them without prompting the user, if that works at all with HTML-formatted emails.

One thing to consider- you're looking to determine whether the email was read, not necessarily just received, right? Format your email so that it can't be easily read without viewing the images, and include a "view in browser" link at the top. Track image and page-format views and I think you'll have a fairly reliable way to measure actual reads.

Dave Swersky
  • 34,502
  • 9
  • 78
  • 118
  • Page-format views are HTML-formatted emails rendered as a webpage in a browser. They're the page you get when you click the "open this email in your browser" link. – Dave Swersky Jul 19 '11 at 14:14
0

We are having major problems with this as well.

We have task wek portal, where users create tasks (like paint my house) and then we invite painters to give the task creator an price on painting his house.

For that we had a very advanced email system, that sends an invitation and if they accept the invitation we send them the contact info of the task creator.

We need to be able to track if the email was opened, and then once it's opened, we know that the company got the contact info, and we can now send another email to the task creator, telling them that they can expect to be contacted by that company.

The problem is that tracking if the email was opened is not reliable at all. There are different systems for this like msgtag (which does not support a wide range of mail clients like yahoo and other major clients) and our email API client (elastic email) even offer some API call back functions to tell us if each email was opened or bounced or whatever. But again, it's not reliable. To track if it's open, elastic email just includes a 1x1 px image and track if it's opened. So if people don't click "show images in this email" it's not tracked as opened.

So basically we are down to two options.

  1. Have vital portions of the content printed on images, that they have to view to get the info we want to track if they got (in this case contact info)

  2. Just have a link in the email "click here to get the contact info" and then track if that is clicked.

So in conclusion, the "track if opened" is totally useless and unreliable, unless you can fully control which email clients your recipients are using and how they are using them (like if they are all your employees or something).