Jump to content

Email Tracking


ds111

Recommended Posts

Hello,

 

  I am trying to make an email tracking application to log whether or not a specific copy of an email has been read or not. I have done some research and have been advised to implant an invisible image into the email message and track through logs for access information.

 

#1) Is the invisible image solution the most optimal?

#2) How do I add the tracking code to the image?

#3) How do I recognize if the image has been accessed?

 

Thanks for the help!

Link to comment
https://forums.phpfreaks.com/topic/167832-email-tracking/
Share on other sites

in your email you could embed a php script as an image, and append an email querystring var so you can log who opens it, hit counts, etc... of course, you're not going to get everyone with this, not everyone will load the image, but you can get a good idea of things.

 

<img src="http://server.com/file.php?email=who_you@sent_to.com" />

Link to comment
https://forums.phpfreaks.com/topic/167832-email-tracking/#findComment-885151
Share on other sites

beat me to it...but posting anyways

 

#1) Yes, it is pretty much the ONLY way you can do it

#2) Just request a PHP file instead of an image in the email:

<img src="http://www.yourserver.com/tracker.php" />

#3) In your tracker.php file, do what you want then redirect them to a 1 pixel transparent gif

<?php
  //Do whatever you want here
  //But don't output anything
  header('Location: blank.gif');
  exit;
?>

 

 

-Applications like Gmail don't show images by default...so not everyone that views the email will get tracked

-If you want to know exactly who opened the email, you will need some sort of "key" to send to the tracker...this can be a user id, email, or some random hash you assign to the user:

<img src="http://www.yourserver.com/[email protected]" />

you can then retrieve the value with $_GET['email'] in tracker.php

Link to comment
https://forums.phpfreaks.com/topic/167832-email-tracking/#findComment-885152
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.