?
Solved

Email/Image Tracking

Posted on 2003-10-27
5
Medium Priority
?
254 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:macromike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 1

Expert Comment

by:robysath
ID: 9635002
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
 

Author Comment

by:macromike
ID: 9635181
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
 
LVL 1

Accepted Solution

by:
robysath earned 2000 total points
ID: 9635777
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
 

Author Comment

by:macromike
ID: 9659226
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
 
LVL 1

Expert Comment

by:robysath
ID: 9661320
Send your e-mail in html form with

<img src="http://www.yourserver.com/path/to/image.gif">
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

801 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