Detect number of times a particular email has been opened

Posted on 2011-10-04
Last Modified: 2012-05-12

I've written a newsletter control panel in PHP and a few thousand emails are sent every month from it. The control panel shows if an email was opened, what date/time and what link was clicked. The open date and time are done using the 1 pixel image trick.

I'm wondering if it's possible to show the number of times a particular email has been opened. Obviously when it's opened the first time, I'm capturing that information. But if the person saves the email with the downloaded images, how would I see if they've opened it again?

Thanks in advance
Question by:kbit
    LVL 10

    Assisted Solution

    There is no sure way of detecting this. The pixel trick may not work at all, since many email clients block the downloading of images by default, unless the user clicks to download these images.

    Even so, you can try setting no-cache headers for the image, that might encourage some clients to download the image again.
    LVL 107

    Accepted Solution

    The pixel trick works, I would say, "a lot of the time."  And it works best if your image content in the messages is valuable enough to the clients that they set their mail program to receive the images every time.  ConstantContact uses exactly this strategy to report.

    But to put it simply, there is no handshake or accountability for email messages, and the number of times a message is forwarded, or re-read is just not in reach.  However you can say this much with authority: The message was opened at least N times and probably several more times.

    Author Comment

    Thanks for both your replies. I've done a test on what I currently have and it seems that even if the images are downloaded and saved in the email, every time the email is opened afterwards, the open date and time are being changed. This is great news as I can use this to count email openings.

    You're both right though, email statistics are far from accurate and I'm constantly warning people of this fact.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now