views:

57

answers:

2

I want to track whenever an email is viewed, so I figured creating a httphandler that reacts to an image, say whenever acme.gif is viewed.

is this straight forward?

Is it just a matter of putting the correct config setting like:

<add verb="*" path="/images/track/acme.gif" ... />

Is this correct?

+1  A: 

I believe that this request will not be handled by asp .net until you setup IIS for it. By default *.gif is static resource which is handled by IIS directly. Why don't just simply use HttpHandler without registering custom extension?

you can use it in img tag like this:

<img src="http://yourserver/YourHandler.ashx" />
Tim
ahh..good idea.
Blankman
A: 

As far as I can see, you have two options. Change the image source to be a dynamic URL, or use a valid image path and forward those requests to ASP.NET.

We use the latter method and forward all image requests to the ASP.NET ISAPI DLL through a application configuration wildcard mapping in IIS and work from there. We have URL rewriting in place to forward the request to a specific page and we include within the URL parameters that identify the particular email recipient. We track the email open and then write out a valid image in the response.

No method of tracking email opens is 100% for some of the reasons given already. People with images turned off, plain text email readers and also proxy level caching. But the comments that this cannot be done easily are wide of the mark.

rrrr