Solved

Email/Image Tracking

Posted on 2003-10-27
5
253 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 500 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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
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 …

717 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