Mail statistics

maybe this forum is not the ideal place for this question, but does
anyone know how to track email statistics? such as clicks, delete,
spam report.

Whenever I have ever wanted to do anything even a little bit more adventurous than password recovery messages from Devise, I always use a third-party service like Mailchimp or MyEmma. They have the entire business down to a science, and they sweat the details day-to-day to remain a non-spam sender. It's very much a full-time job that I'm happy to pay someone else to do. And they have all those "who opened it" trackers baked in.

Walter

the problem is that I need to create this type of service, like the
MailChimp.

the problem is that I need to create this type of service, like the
MailChimp.

Then you're going to have to solve the same problems they have.

The usual way to figure out if someone has opened a mail message is to add a "beacon" image to it. You add a 1x1px image in the body of the e-mail message linked from your server, and use the path to that image to convey a code. <img src="http://example.com/tracker/asdfs78223/pixel.gif" /> Another spin on this is to add the token to each regular image in your layout. You make up these tokens when you send out the message, so you know that asdfs78223 == joebob@foo.com.

Back in Rails, you create a route for this image, and serve the image but also record the request in your database.

Walter

And in practice of course it doesn't work very well as a lot of people
have their mailer set to not automatically show images. In fact I
think everyone who realises that they /can/ set their mailer up like
that does, for precisely the reason that we don't want people snooping
on us.

Colin

That goes without saying for the class of users who know where the preferences are and change the from the defaults. I'm certainly in that camp myself. But the vast majority of people who don't ever change these defaults do get tracked this way, despite my efforts to educate them.

Walter

Is not the default in gmail and thunderbird to not show images? I may
be wrong. No doubt the default in Outlook is to show everything under
the sun and ignore security issues.

Colin