跟踪图像何时加载到电子邮件中的 HttpHandler
我想跟踪何时查看电子邮件,因此我想创建一个对图像做出反应的 httphandler,例如每次查看 acme.gif 时。
这是直接的吗?
这只是放置正确的配置设置的问题,例如:
<add verb="*" path="/images/track/acme.gif" ... />
这是正确的吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信在您为其设置 IIS 之前,asp .net 不会处理此请求。默认情况下,*.gif 是静态资源,由 IIS 直接处理。为什么不直接使用 HttpHandler 而不注册自定义扩展呢?
你可以在 img 标签中使用它,如下所示:
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:
据我所知,你有两个选择。将图像源更改为动态 URL,或使用有效的图像路径并将这些请求转发到 ASP.NET。
我们使用后一种方法,通过 IIS 中的应用程序配置通配符映射将所有图像请求转发到 ASP.NET ISAPI DLL,然后从那里开始工作。我们进行 URL 重写,将请求转发到特定页面,并在 URL 中包含标识特定电子邮件收件人的参数。我们跟踪电子邮件的打开情况,然后在回复中写出有效的图像。
由于某些已经给出的原因,没有一种方法可以 100% 跟踪电子邮件打开情况。关闭图像的人、纯文本电子邮件阅读器以及代理级别缓存。但认为这不容易做到的评论是离谱的。
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.