Introduction
Most of the email users get a number of opt-in emails each day. Many of you might have noticed that a marketing campaign starts and sends out a number of emails. At the beginning, you might have interested reading such advertising. And eventually you stopped reading them. But the marketing company would not stop sending you emails and you also didn't opt-out yourself from the mailing list! Although after a certain period of time, you might have noticed that the company stopped sending you further emails.
Question is that, did they stop their campaign? Answer is 'possibly no'. So why they stopped sending you email. Did they know that you are not reading their emails? Answer is 'probably yes!' 'Yes?' - but how they could know that you are no longer interested in reading their email offers?
Background
It's all about a technique called 'email tracking'. By email tracking, a marketing company can track whether you read a particular post. That is, after sending emails to you, they can track out whether you've read those emails at all. Even surprisingly, they can also track the location and date/time when (and from where) you've read those emails!
Is it really possible at all? Yes technically it's very easy to track emails whether they are read or not!
Before we go into too depth, we must understand that only email containing HTML as part of its MIME type can be used to be tracked. As you know, in an HTML email we can easily put a graphics in it. Graphics can be very nice image, or it can simply be an invisible image (a transparent image with 1x1 size for example).
When we put an image into an HTML source we write similar to the following:
<img src="some-source-onto-your-server.gif"/>
But when it's required to track an e-mail's status, the src property of the <img> element looks a bit trickier. Consider the following:
<img src="ImageServer.aspx?imageID=track.jpg& custID=134ghxx34343ai& campID=32434"/>
Using the code
As you can guess easily that the image source url itself (the src property of the <img> tag) does not point to an image type file, instead it's a query string to be executed within an .aspx file (may be also .jsp, .php etc.). That's all behind the scene. The code inside the ImageServer.aspx.cs is as simple as following:
private void Page_Load(object sender, System.EventArgs e)
{
Response.ContentType = "image/jpeg";
if (!IsPostBack) Track();
Response.WriteFile(GetImageFileByID());
}
When the browser sends a GET method using the above query string, the .aspx file parses the query, determines who the user opens the email up to read, then the program stores a flag in the database table to indicate that a particular email for a particular campaign has been opened by the customer. Additionally the program can also store other information; such as date/time information, remote IP to determine location information etc.
In my code, I have used an index.aspx file as if it were an email previously sent to a customer to mimic the fact when such email tracking occures in real life.
Test vs Real Life Project
Please bear in mind that in a real life and fit-to-production-environment email campaign solution, this implementation can't give the ultimate performance. Usually for such big real life project, one need to implement fully fledged tracking server, which acts like a web server (almost like the IIS itself).
Final Thoughts
Upon only one reason the above program may fail to track to determine whether a particular email has been opened or not - if the email client (such as Yahoo or MSN) disables the graphics to be downloaded for email containing HTML content. In Yahoo Mail, user can set their preference not to download graphics for their emails. In this case <img> tags are tweaked by the Yahoo Server, and hence no graphics would be downloaded from other servers. So as no image to download, no tracking to occur at the marketing agent's end!!!
That's all about email tracking!!
| You must Sign In to use this message board. |
|
|
 |
|
 |
Hi, I am using the email tracking option in php. As you have said if the images does not load then that user cannot be tracked. can you drop some references to the full fledged email tracking options.?
Today's Beautiful Moments are Tomorrow's Beautiful Memories
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks for yours help to find out the Opened email. Can you please tell me, how to track the Forwarded and Spam email like this.
Thanks & regards Navaneethakrishnan T
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Dear Sir,
I just wish to know if it is possible?
Mine application requirement is to know the folder name(eg. inbox, spam etc) from which the mail was openend.
I am using java technology for this application, however if the above thing is possible in either technology(ie .net or java), please let me know.
Thanks Sudhir
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Thanks for your query. For some reasons or the others, I can't fully concentrate on this topic nowadays (to test out how we can track particular mail box). Did you try tracking of referrer url (should be accessible from the request object of any language of choice) to parse the pattern to reveal the info? This technique may help. Please let me know if this works.
Mohammad Ali Azam
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
Thanks for responding Sir.
Yes, I m using this 'referer' url technique that i am fetching from request, but it works only in a few cases, and even in those cases its not consistent, say in case of Gmail, it some times shows the folder name the mail was opened from n sometimes it gives a url that is same for every folder (Inbox, Spam etc) n its hard to decide the folder name the mail was opened from, more over in case of a few webmail server the referer url hardly enables me to decide the folder name and some times its even null.
Is there some other way (in place of referer), or anything else i can use to decide the folder name the mail was finally delivered to.
Thanks Sudhir
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
When you send out emails, obviously you use a list of email users managed in a database table (each user has his/her own id in the table - that you use to append to the image's source attribute). So when user opens up an email, your tracker program knows the user id, so it can examine the email user against this id to investigate all the user details including email address, for which campaigns the mail was sent for etc.
Hope you never send emails to them, who are not in your user list !!
Mohammad Ali Azam
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Well, better to use in this way
<img src="http://yourserver/134ghxx34343ai-32434.jpeg">
instead of using .aspx page. You can create a handler in your application to handle jpeg types (know what I mean?)
who knows it is a tracking image or normal picture?
BTW in 134ghxx34343ai-32434.jpg, 134ghxx34343ai is your client id and 32434 is the campaign id.
-- modified at 8:55 Saturday 19th August, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Its a bit tricky actually. You must have knowledge how to create an HttpHandler in ASP .NET to do this. I assume you already know it, otherwise, search for articles on internet to have an idea
Create an HttpHandler to handle .JPEG extensions so that whenever some request like www.yourserver.com/abcdef.jpeg is made, it goes to your handler. I choose this since it is image type and not used as common as JPG or GIF etc.
When sending email, place an image with src="www.yourserver.com/123-456.jpeg" where 123 is the user id and 456 is your distribution id (or mail id). Indeed it all depends on the technique you are using to distribute mails and their tracks.
Once request is in your HttpHandler (which will if user has enabled to show images in his mail client since www.yourserver.com/123-456.jpeg is an image request and it will go to your server), parse the file name (123-456.jpeg) to extract user id and distribution id and log in database.
Once you have logged things, create a simple 1x1 image or load some image from your website images and render that to response stream. User will always know that it was a normal image coming from server, but instead you tracked that user has opened your email.
Hope that will help. Sameers
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
If you do like this, your recipient's mail server/client will filter your mail out because they do think it's spam.
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
|
 |
|
|