Tracking users in the Application.cfc, please help

Hello;
I wrote a small system for my website. I am trying the upfrade he works in CF 8. Here's what I do.

I got this code on my site index.cfm page. I'm trying to move it to the Application.cfc file. When I do, it fits into the DB whenever the user hits a page or click on a link. I don't want to do this. I don't want that he tell me when they hit the site, and if I can what page they came in.

Here is my code:
< cfquery name = "tracking" datasource = "my - DB" dbtype = "ODBC" >
INSERT INTO followed (HTTP_USER_AGENT, TRACK_DATE, REMOTE_ADDR, PageID)
VALUES (' #REMOTE_ADDR #', ' #HTTP_USER_AGENT #', #CreateOdbcDateTime (now ()) #)
< / cfquery >

My pageID is go wherever I want information about what the user came on the page.
I placed the query inside a function of session code, but it does not work at all right now, I need to limit the shots counted by the Application.cfm, if I place it within the area of application which is for global variables, it adds information to the DB every time, they click on a link, and I don't want that. With respect to the entry of the user page, I'm doing so that if someone enters the site leaves the floor on the about.cfm page, which is added to the db and so on. Is this possible? If so how would I do that?

Here is my code so far application.cfc:

< cfproperty output = "false" >
< cfset myIdName = 'my web' >
< cfset this.sessionManagement = "yes" >
< cfset this.clientManagement = true >

< cffunction name = "SystemFramework" returntype = exit "boolean" = "false" >
< cfset APPLICATION.appStarted = now() >
< cfreturn true >
< / cffunction >

< cffunction name = returntype = "Sub" output = "false" "onApplicationEnd" >
< cfargument name = "appScope" required = "True" >

< cflog file = "" #THIS.name # "text =" App ended after #dateDiff (', ARGUMENTS.appscope.appStarted, now ()) # minutes. ">"
< / cffunction >

< cffunction name = "onSessionStart" returntype = out of the "query" = "true" >
< name cfquery = "tracking" datasource = 'creative' dbtype = "ODBC" >
INSERT INTO followed (REMOTE_ADDR, HTTP_USER_AGENT, TRACK_DATE)
VALUES (' #REMOTE_ADDR #', ' #HTTP_USER_AGENT #', #CreateOdbcDateTime (now ()) #)
< / cfquery >
< / cffunction >

< cffunction name = "onRequestStart" returntype = exit "boolean" = "true" >
< cfset request.datasource DB ' my-">
< cfset sitePath = " http://www.myweb" >

<!-this is where I put the tracking code and it added to the DB whenever someone clicks on a link. not what I want->

<! - real Variables URLs beginning - >
< cfloop list = "#removeChars (cgi.path_info, 1, len (cgi.script_name)) ' # ' delimiters =" / "index ="variableSet">"
< cfscript >
variableName = "url." & listGetAt(variableSet,1,'.');
expression = listGetAt(variableSet,2,'.');
< / cfscript >
< name cfparam = "" #variableName # "default =" #expression #">"
< / cfloop >
<! - real Variables URLs finishing - >
< cfreturn true >
< / cffunction >
< / cfproperty >

Thank you.
Phoenix

OK, I did a dump of the CF to the cgi on the server.

He came back with all the cgi can be used on the server, it looks like I want to use cgi's PATH_INFO
When I put it there, I get an error using this code: can I use this code instead? y at - it a big difference?

Thank you.

Tags: ColdFusion

Similar Questions

Maybe you are looking for

  • Xbox 360 Media streaming from Vista Media Center, required codec on XBOX but not other extensors?

    I am trying to use my Media Center on my Xbox - but I am unable to get the videos to play, other than the native codecs from Microsoft. Now, if I connect to Media Center on the Xbox and go through the video dashboard they play all since I have sharin

  • Should what programs or tools I use to type address labels that will be used later for different things.

    I want to type the labels with the names and addresses that will be used on invitations to that also the names on this list will be used for cutlery on the tables and use at the door to tell people what table they are seated.  does anyone have any in

  • Program guide for WMC

    My guide channel for windows media center stop the update.   I do not understand what has happened since his was working fine just a week ago.  I tried to update the guide, but it won't work.   I've updated everything currently installed.     My guid

  • Installation of windows 7 Windows xp

    I'm trying to install windows 7 from and I currently have windows xp. Loads of windows 7 and I click on install windows 7, he said: copying temporary files, then an error message pops up saying please try reinstalling, ox6 error. What's wrong?

  • A &amp; QUESTION SRV RECORD

    I have a real? Have a network of VCS X8.2.2 of two cluster control. I was running a three server cluster, but due to latency issues took the VCS3, I deleted from the cluster and makes it independent. I removed the intellectual property of the counter