Tracking user clicks.... one way....
A few days ago a user on Easy asked a question about tracking users click through your site, like a breadcrumbs.... now naturally my suggestion was to insert a value to the database and then (based on the user's IP address) return back the data for display. This is still my favorite solution as it is quick and painless; the user however asked me to provide a solution that did not involve the database... so here goes nothing.... (disclaimer, use the database it's better and allows you to get data long term, but for a short timespan type thing this might help you... so I thought I'd post it.
Put this in your application.cfm or application.cfc
(onRequestStart).
<!--- create an application structure to track all
users --->
<cfparam name="application.clickStream"
default="#structNew()#" />
<!--- create an array in the structure for this user
(by ip) --->
<cfparam
name="application.clickStream['user_'&cgi.REMOTE_ADDR]"
default="#arrayNew(1)#" />
<!--- now insert this current page for this user --->
<cfset application.clickStream['user_'&cgi.REMOTE_ADDR][val(ar
rayLen(application.clickStream['user_'&cgi.REMOTE_ADDR]
)+1)] = cgi.SCRIPT_NAME />
<!--- THIS you can use to see the actual dump of all
users... --->
<cfdump var="#application.clickStream#" />
As mentioned before, the database is the best route; but this is one route you could go.























