RE: Tracking Refferal Pages
DD, We have some code that we use in the application.cfm at homepage level. Here is the code we use: !--- wehre did the user come from? How did they find us? --- cfif (cgi.http_referer CONTAINS mfgquote.com is NO) and (cgi.http_referer is not ) cfif isDefined(URL.source) cfset Promo = URL.Source cfelse cfset Promo = /cfif CFQUERY NAME=InsertReferer DATASOURCE=#myDSN# INSERT INTO RefererLog (CFIdCFToken, refererURL, IP, Browser, Promo) VALUES ('#cookie.CFID#:#cookie.CFToken#', '#cgi.http_referer#', '#cgi.REMOTE_ADDR#', '#cgi.HTTP_USER_AGENT#', '#promo#') /CFQUERY /cfif As you can see above we insert the referer from outside sources into a database table. We also use the variable promo for URLs that come from Paid advertising so we can track it. Then upon registration we do an update of this table based off the user's CFID:CFTOKEN. Is this a perfect way? NO, but it does give us some great metrics to know how much each registered user costs us. Hope this helps, Jeremy Jeremy Bruck, VP of Technology ::MfgQuote 2690 Cumberland Parkway SE Suite 510 Atlanta, GA 30339 TEL: 678.556.2929 FAX: 678.556.2980 www.mfgquote.com [EMAIL PROTECTED] -Original Message- From: Double Down, Inc. [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 5:05 PM To: CF-Talk 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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Tracking Refferal Pages
CGI.HTTP_REFERER should be what you need. -Original Message- From: Double Down, Inc. [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 5:05 PM To: CF-Talk 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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Tracking Refferal Pages
On the simple level - I have used the CGI.Refferer variable available - you can simply parse in the CGI.Refferer variable and include it in an SQL insert or an cfinsert. You can get pretty creative with the CGI information available an inserting it into database. jay miller Double Down, Inc. wrote: 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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Tracking Refferal Pages
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# CFELSECFQUERYPARAM 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=subscribeforumid=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
Re: Tracking Refferal Pages
On 1/10/03, Double Down, Inc. penned: 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. You could place something like this at the top of every page: cfset mydomain = www.somedomain.com cfset thispage = sometemplate.cfm CFIF cgi.http_referer does not contain mydomain cfset camefrom = cgi.http_referer cfset cameto = thispage CFQUERY DATASOURCE=mydatasource INSERT INTO tracking_table (Referer, Page_Visited, When_Visited) VALUES ('#camefrom#', '#cameto#', #CreateODBCDateTime(now())#) /CFQUERY /CFIF Alternately you could put it in Application.cfm and change cfset thispage = sometemplate.cfm to cfset thispage = listlast(cgi.script_name, /) That is if you want to grab the entry page also. -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Tracking Refferal Pages
Another option is to post-process your access logs. In other words, set up a process to parse your access logs at some set interval and insert the data (in your case, the just referrer) into a database. This works well for extremely high volume servers like those used in ad serving. Christian On Friday, January 10, 2003, at 05:05 PM, Double Down, Inc. wrote: 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=subscribeforumid=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