电子邮件追踪 - GMail

发布于 2024-10-18 16:58:07 字数 1316 浏览 1 评论 0原文

我正在创建自己的电子邮件跟踪系统,用于电子邮件营销跟踪。我已经能够通过使用http引用来确定他们正在使用的每个人的电子邮件客户端,但由于某种原因,GMAIL根本不发送HTTP_REFERRER!

因此,我试图找到另一种方法来识别 gmail 何时从我的服务器请求透明图像。我得到以下标题 print_r($_SERVER);

DOCUMENT_ROOT  =  /usr/local/apache/htdocs

GATEWAY_INTERFACE  =  CGI/1.1

HTTP_ACCEPT  =  */*

HTTP_ACCEPT_CHARSET  =  ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP_ACCEPT_ENCODING  =  gzip,deflate,sdch

HTTP_ACCEPT_LANGUAGE  =  en-GB,en-US;q=0.8,en;q=0.6

HTTP_CONNECTION  =  keep-alive

HTTP_COOKIE  =  __utmz=156230011.1290976484.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=156230011.422791272.1290976484.1293034866.1293050468.7

HTTP_HOST  =  xx.xxx.xx.xxx

HTTP_USER_AGENT  =  Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

PATH  =  /bin:/usr/bin

QUERY_STRING  =  i=MTA=

REDIRECT_STATUS  =  200

REMOTE_ADDR  =  xx.xxx.xx.xxx

REMOTE_PORT  =  61296

REQUEST_METHOD  =  GET

该列表中有什么用处吗?或者我还能做些什么来真正获取http引用,如果不是的话其他ESP如何设法找到gmail是否被用来查看电子邮件

顺便说一句,如果我们能克制一下这是否符合道德,我会很感激,因为许多 ESP 已经这样做了,我只是不想为他们的服务付费,我想在内部这样做。

感谢大家的任何实施建议。

更新

只是想我会更新这个问题并根据赏金使其更清楚。

我想知道用户何时打开我发送到 GMail 收件箱的电子邮件。假设,我有通常的透明图像跟踪,并且用户不阻止图像。

我想通过单个请求和请求透明图像时获得的标头详细信息来完成此操作。

I am creating my own email tracking system for email marketing tracking. I have been able to determine each persons email client they are using by using the http referrer but for some reason GMAIL does not send a HTTP_REFERRER at all!

So I am trying to find another way of identifying when gmail requests a transparent image from my server. I get the following headers print_r($_SERVER);:

DOCUMENT_ROOT  =  /usr/local/apache/htdocs

GATEWAY_INTERFACE  =  CGI/1.1

HTTP_ACCEPT  =  */*

HTTP_ACCEPT_CHARSET  =  ISO-8859-1,utf-8;q=0.7,*;q=0.3

HTTP_ACCEPT_ENCODING  =  gzip,deflate,sdch

HTTP_ACCEPT_LANGUAGE  =  en-GB,en-US;q=0.8,en;q=0.6

HTTP_CONNECTION  =  keep-alive

HTTP_COOKIE  =  __utmz=156230011.1290976484.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=156230011.422791272.1290976484.1293034866.1293050468.7

HTTP_HOST  =  xx.xxx.xx.xxx

HTTP_USER_AGENT  =  Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10

PATH  =  /bin:/usr/bin

QUERY_STRING  =  i=MTA=

REDIRECT_STATUS  =  200

REMOTE_ADDR  =  xx.xxx.xx.xxx

REMOTE_PORT  =  61296

REQUEST_METHOD  =  GET

Is there anything of use in that list? Or is there something else I can do to actually get the http referrer, if not how are other ESPs managing to find whether gmail was used to view an email?

Btw, I appreciate it if we can hold back on whether this is ethical or not as many ESPs do this already, I just don't want to pay for their service and I want to do it internally.

Thanks all for any implementation advice.

Update

Just thought I would update this question and make it clearer in light of the bounty.

I would like to find out when a user opens my email when sent to a GMail inbox. Assume, I have the usual transparent image tracking and the user does not block images.

I would like to do this with the single request and the header details I get when the transparent image is requested.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小糖芽 2024-10-25 16:58:07

您的图像是通过 HTTP 还是 HTTPS 请求的?

如果是这样,那就是问题所在。

HTTPS->HTTP 引用不会泄漏 Referer 标头 (HTTP_REFERER)。

如果您在从 HTTPS 页面请求的电子邮件中嵌入 HTTP 托管图像,则它不会发送引荐来源网址。 (但是,请求 HTTPS 的 HTTP 页面确实会发送引用站点)。解决方案是将图像嵌入为 HTTPS。我已经测试过了,果然,安全的 HTTPS 图像确实会发送 Referrer。

默认情况下,Gmail 可以阻止加载图片上的引荐来源网址信息的一种方法是,如果他们使用引荐来源网址政策,大多数现代浏览器都支持。 (截至 2011 年,他们没有实施这样的政策。)

请参阅下面的嵌入图像的屏幕截图,该图像是使用请求的 HTTP REFERER 动态生成的:
在此处输入图像描述

Are your images requested with HTTP or HTTPS?

If so, that's the problem.

HTTPS->HTTP referrals do not leak a Referer Header (HTTP_REFERER).

If you embed a HTTP hosted image in an email that is requested from an HTTPS page, it won't send a referrer. (HTTP pages requesting HTTPS, however, do send a referer).The solution is to embed the image as HTTPS. I've tested it, and sure enough, secure HTTPS images do indeed send the Referrer.

One way Gmail could block the referrer information on loaded images by default is if they used a referrer policy, which is supported on most modern browsers. (As of 2011, they did not implement such a policy.)

See the below screenshot of an embedded image that is generated dynamically with the HTTP REFERER of the request:
enter image description here

天涯沦落人 2024-10-25 16:58:07

使链接类似于 http://www.example.com/image.jpg?h= 8dh38dj

image.jpg 是一个 PHP 文件,8dh38dj 是您包含链接的电子邮件的哈希值。当用户请求该文件时,您的 PHP 脚本将获取“8dh38dj”,在数据库中查找并找到匹配的电子邮件。从 [email protected] 解析域名 ie gmail.com,你就知道了来自 gmail。要使 jpg 文件作为 PHP 执行,请在 php 中使用 AddHandler

Make the link something like http://www.example.com/image.jpg?h=8dh38dj

image.jpg is a PHP file and 8dh38dj is the hash of the email you included the link in. When the user requests the file, your PHP script will get '8dh38dj', look that up in your database and find the matching email. Parse the domain i.e. gmail.com from [email protected] and you know it is from gmail. To make jpg files execute as PHP, use an AddHandler in php

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文