Track mass email campaigns

∥☆過路亽.° 提交于 2019-11-27 02:37:02

The code works in the following way:

<style>
/* Print stylesheet */
@media print{
    #_t { 
        background-image: url('https://a6.emltrk.com/XX0000XX?p');
    }
}
/* Forward stylesheet */
div.OutlookMessageHeader, table.moz-email-headers-table, blockquote #_t {
    background-image:url('https://a6.emltrk.com/XX0000XX?f')
}
</style>

<!-- Extra DIV -->
<div id="_t"></div>

<!-- Main Image -->
<img src="https://a6.emltrk.com/XX0000XX" style="display:none" width="1" height="1" border="0" />

There is an image that gets loaded when the email is viewed. This counts the "opens" statistic.

There is also an extra div (with the id _t) which is referenced from a stylesheet. The @media print section applies a background image when the email is being printed. The url of the image has the additional p attribute, which probably tells Litmus that the email is being printed.

The forward statistic is calculated in a similar manner: a background image is loaded when certain elements are present. Outlook matches the div.OutlookMessageHeader, something else (looks like Thunderbird perhaps, given the moz) matches table.moz-email-headers-table, and everything else matches blockquote #_t (using the additional DIV again). These elements are created by the email client when the forwarded email is being composed. The image is this time loaded with the f flag, which tells Litmus to calculate the forward statistic.

These statistics must be taken with a grain of salt, however: most email clients will block images of any kind until the user decides to show them. Most webmail clients will completely strip out any stylesheets, which makes the print and forward statistics irrelevant for clients like Gmail, Hotmail, and Yahoo! Mail.

I hope this makes sense! I haven't quite figured out the glanced/deleted statistic yet. When I do, I'll be sure to let you know.

I think a nice way to track the time someone has the e-mail open is to simulate a very slow connection.

You can simply build a tracking handler which returns the tracking image byte by byte. After every byte flush the response and sleep for a period of time.

If you encounter a stream closed exception the client has closed the e-mail (deleted or changed to another e-mail who knows).

At the time of the exception you know how long the client 'read' the e-mail.

Hope this helps ;-)

I wonder if for skims if it could request an image, but the src script sleeps for a few seconds, then does a 302 redirect to itself. It could count the number of times it got redirected, and stop redirecting after a certain amount of times to make sure the browser doesn't prompt with the redirect loop warning (but maybe browsers don't do that warning for images anyway, I've never tested it).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!