Email/Image Tracking

Hi all-
  I have very little perl/cgi experience, but I have built a coldfusion application that allows for bulk email marketing and managing, and I was curious as to how to set up a tracking system for the emails being sent through my application.  In basic form, I would like to have a log that shows who and how many opened the email, if possible, I would like to go further and have these stats available for display by our clients.

Any help would be great-
thanks-
-m
macromikeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

robysathCommented:
I hope this is not spam messaging related! :)

You can send an html message with an image. The url for the image should point to a perl script on your web-site. This perl script can determine all the information about the user when they connect to retrieve the image data.
0
macromikeAuthor Commented:
That is exactly what I want to do, I tried browsing through the cgi resource, but a lot of the scripts there seemed more complex than what I needed.  Do you have a sample url I could use to learn from? or an example script?

Thanks-
-m
0
robysathCommented:
Shouldn't be hard:

#!/usr/local/bin/perl

$today = `date`;

# Hey, let's remember some info about this person
open(FILE, ">>info.txt");
print FILE "$today\n";
print FILE "REMOTE_ADDR: $ENV{'REMOTE_ADDR '}\n"';
print FILE "HTTP_USER_AGENT: $ENV{'HTTP_USER_AGENT'}\n";
print FILE "HTTP_REFERER: $ENV{'HTTP_REFERER'}\n";
print FILE "--------------------------------------------------\n";
close(FILE);

# Ok send them the image
open(FILE, "/path/to/image.gif");
@file=<FILE>;
close(FILE);
print "Content-type: image/gif\n\n";
print @file;

You can then parse through the gathered data in info.txt

Example of REMOTE_ADDR: 192.75.116.16
You can do a reverse lookup to find out what domain the user is from. Then write perl code to get stats of all the domains.

Note sure how useful HTTP_REFERER is if they are reading their e-mail from Microsoft Outlook Express or the like.

Example of HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)
You can write perl code to determine the most popular browser and Operating System.

There are probably lots of other environment variables you can store and gather statistics on, have a look on google for a possible list or check ur server with this code:

foreach $key (keys(%ENV))
{
  print "<p>$key = $ENV{$key}</p>\n";
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
macromikeAuthor Commented:
And then what do I put in for my image link in my email?  Thanks for all the help, you are the man! let me know if you need some actionscript help ;-).
0
robysathCommented:
Send your e-mail in html form with

<img src="http://www.yourserver.com/path/to/image.gif">
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.