Take a look at the #CGI.HTTP_REFERER# variable...  This will contain the
information (if it is available...)

Then you can put something like this in your Application.cfm or
OnRequestEnd.cfm

<!--- pump referer information into DB...--->
<CFQUERY datasource="mydsn" name="foo">
INSERT INTO Referers(page, referingpage)
VALUES(
<CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" value="#CGI.SCRIPT_NAME#">,
<CFIF Len(CGI.HTTP_REFERER)>
<CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" value="#CGI.HTTP_REFERER#">
<CFELSE><CFQUERYPARAM cfsqltype="CF_SQL_VARCHAR" value="None"></CFIF>
</CFQUERY>

Table Design:

Create Table Referers (
recordID int IDENTITY(1,1) NOT NULL,
page varchar(255),
referingpage varchar(255),
theDate smdatetime NOT NULL CONSTRAINT [DF_test_theDate] DEFAULT (getdate())
)

HTH,

Jeff Garza

----- Original Message -----
From: "Double Down, Inc." <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 3:05 PM
Subject: Tracking Refferal Pages


Can anyone suggest a good method for tracking what page bought a surfer to
my page? I need to be able to get that information and put it in a DB.

TIA

DDINC

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to