Email Tracking

Hi All

I hope someone can either help or point me in the right direction…

We have built a website where we can upload our email lists and then send emails to all the people on the list.

We have added tracking to the emails so we know if someone has come to the website and if they have what they have done.

I also want to track if the email was opened before being deleted, if the email went to the users inbox or straight to spam and any other relevant information to help me hone the emails to be most effective.

We can’t seem to work out how to get this information… does anyone know:

  1. Is this possible?

  2. If so, how do we do it?

Thank in advance for any help.

mrmbarnes

you have to set up your own email client with these features to track this information, and every user has to use it. email is one-way communication as long as the user does not activly provide any reaction. email clients will activly manage to prevent privacy information getting leaked to the sender for exact this reason: to prevent tracking. you do not know wether the email was read, nor if the email was even received - most mailservers do not even bounce, so that an attacker can not verify the existence of an emailaddress. and i would kick every admin in the nuts if his machine tells anybody else in which folders i put my mails, e.g. spam.

Yes, you’re pretty much onto a loser there unfortunately. There are all sorts of techniques you can use, but pretty much all of them can be worked around, in a similar way to the often-asked “how do I disable right-click on my web page”.

You might want to ask it in a less language-specific area of the forum, as it’s not really specific to the PHP language.

Topic moved to General Web Dev.

I think one of the tricks that was used was for the mail to contain an image with an absolute URL plus an identifiable variable, maybe something like:-

<img src="http://www.example.com/images/something.gif?id=95478gh8584jhfnju83983k" width="1" height="1" />

Then the server logs if a request for that was made. The problem being that many email clients will block images and other external resources for security concerns, so unless the user deliberately enables the viewing of images in the mail, this will not work.

I built our first enews system and ran that up to 10k subscribers (we have long since surpassed that and have moved to a 3rd party service) … So to track if the email was opened and by which user i would embed a 1px x 1px ‘image’ which was actually a .php page. So the link would be similar to @SamA74’s example but like this

<img src="http://www.example.com/images/something.php?id=95478gh8584jhfnju83983k" width="1" height="1" />

when that php page is called the variable is used to log that user opened the email each time (if they opened it more than once that would be logged). Once that database transaction is complete the php page then outputs headers as a .gif and returns a 1px x 1px image. the email client doesn’t care as it thinks it has returned an image

This as pointed out relies on ‘images from remote sites’ being allowed. The work around for this is to add this information to the links within the enews. So again if a user clicks a link a unique variable is passed to a processing page and logged before sending them to the correct page. You can then assume the email was opened by the user even if they didn’t download the images and update that table to reflect this.

Where they put the email, as above, you are never going to know.

Open up some enews from other companies and you’ll see all the links have loads of variable and there will most likely be a tracking pixel there somewhere

hth

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.