[thelist] Using img tags to track users...

Ryan Finley RyanF at SonicFoundry.com
Wed Mar 14 13:25:31 CST 2001


Here's another example...If you want to track who opens your HTML email.

Put this tag in your email:

<img src="checkUser.asp?EmailID=1&UserID=1234" width=1 height=1>


Here is checkUser.asp:

<%
Response.ContentType = "image/gif"

emailID = Request.QueryString("EmailID")
userID = Request.QueryString("UserID")

Set SQLConn = Server.CreateObject("ADODB.Connection")
Call SQLConn.Open("SQLServer", "sa", "")

Call SQLConn.Execute("INSERT INTO UserTracker(EmailID, UserID)" _ &
	" VALUES (" & emailID & "," & userID & ")")
%>
.
.
.
binary code for gif file goes here
.
.
.


Hope this helps,

	Ryan Finley
	President - SurveyMonkey.com


-----Original Message-----
From: Ryan Finley 
Sent: Wednesday, March 14, 2001 1:06 PM
To: 'thelist at lists.evolt.org'
Subject: RE: [thelist] Speaking of detecting: howto detect Javascript
on/off?


It's the same way you can send HTML email and track who opens it.

The image src points to a server side script that takes the information off
the URL and then changes the content-type of the page to "image/gif",
passing back a 1x1 invisible gif file.

You can do some pretty nifty stuff if you do:

var extra_info = GetInfoAsURLParam();
document.write("<img src='dummy.gif?" + extra_info + "'>");

The "extra_info" could be the size of the screen, bit depth, etc.
Basically, any type of information you can get via Javascript.

	Ryan Finley
	President - SurveyMonkey.com

-----Original Message-----
From: James Aylard [mailto:evolt at equilon-mrc.com]
Sent: Wednesday, March 14, 2001 1:11 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] Speaking of detecting: howto detect Javascript
on/off?


jeff,

> all of this redirection-detection got me thinking.  what if there were a
way
> to detect without a redirect?  how would one do that?  what i'd do is swap
> an image (well, not really an image, but i think you'll understand where
i'm
> going with this) and pass it on the server that way.  something like this:

    Very interesting. Borrows a page from doubleclick, et al. ;) What's not
clear to me (and I'm probably superimposing some preconceived notions on
this) is how you actually use the img src value in practice? Can you give a
scenario with a code snippet or two to clarify? Thanks.

James Aylard



---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt ! 




More information about the thelist mailing list