Ooops.... yes, of course.
You can use the #script_name# variable.
And if you want to do it fusebox style, you can use the following logic instead:
<!--- begin page hit count --->
<br>
<br>
<font size="-2">
<cfset page = "#script_name#" & "?" & "#query_string#">
<cftransaction>
<cfquery name="gethits" datasource="#session.dsn#">
SELECT * FROM counter
WHERE page = '#page#'
</cfquery>
<CFIF #gethits.recordcount# is 0>
<CFQUERY name="makepage" datasource="#session.dsn#">
INSERT INTO counter (page,hits)
VALUES ('#page#', 2)
</cfquery>
<CFSET hits = 0>
1
<CFELSE>
<cfif (remote_addr eq "24.8.137.130") or (remote_addr eq "24.7.62.126")>
<cfoutput>#gethits.hits#</cfoutput>
<cfelse>
<!-- Current Hit Count:
<cfoutput>#gethits.hits#</cfoutput>
-->
</cfif>
<CFSET newhits = (gethits.hits + 1) >
<CFQUERY name="updatehits" datasource="#session.dsn#">
UPDATE counter
SET hits = #newhits#
WHERE page = '#page#'
</cfquery>
</CFIF>
</cftransaction>
</font>
<!--- end page hit count --->
--------------------------------------------------------------
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--------------------------------------------------------------
> -----Original Message-----
> From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 22, 2000 4:44 AM
> To: CF-Talk
> Subject: RE: Page Tracking & hits :: User Movments on an Intranet
>
>
> would you also need to insert the name of the page?
> so that you can see what page & how long they where on it?
>
> thanks for the advice.
> -paul
>
> > -----Original Message-----
> > From: Warrick, Mark [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, December 21, 2000 1:03 PM
> > To: CF-Talk
> > Subject: RE: Page Tracking & hits :: User Movments on an Intranet
> >
> > Hi Paul,
> >
> > I really don't think there is a tutorial. You can use the code below as
> > an example. This is the easiest way to track visitors. You
> would include
> > this into every template. (by the way, this has nothing to do
> with server
> > logs)
> >
> > <cfset ip = "#cgi.remote_addr#">
> > <cfset login_time = "#TimeFormat(Now(), "HH:MM:SS")#">
> > <cfset login_date = "#DateFormat(Now(), "MM/DD/YYYY")#">
> >
> >
> > (of course you'll need to create a database for this)
> >
> > <cfquery name="record_visit" datasource="#dsn#">
> > INSERT INTO access_log (
> > ip,
> > login_date,
> > login_time)
> > VALUES (
> > '#ip#',
> > '#login_date#',
> > '#login_time#')
> > </cfquery>
> >
> > ---mark
> >
> >
> > --------------------------------------------------------------
> > Mark Warrick
> > Phone: (714) 547-5386
> > Efax.com Fax: (801) 730-7289
> > Personal Email: [EMAIL PROTECTED]
> > Personal URL: http://www.warrick.net
> > Business Email: [EMAIL PROTECTED]
> > Business URL: http://www.fusioneers.com
> > ICQ: 346566
> > --------------------------------------------------------------
> >
> >
> > > -----Original Message-----
> > > From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, December 21, 2000 4:51 AM
> > > To: CF-Talk
> > > Subject: RE: Page Tracking & hits :: User Movments on an Intranet
> > >
> > >
> > > is there a tutorial for this in the advanced wack book?
> > > guess i should just look my self, sorry.
> > >
> > > i cant use server logs.
> > > they are turned off
> > > thanks
> > > -paul
> > >
> > > > -----Original Message-----
> > > > From: Warrick, Mark [SMTP:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, December 20, 2000 1:25 PM
> > > > To: CF-Talk
> > > > Subject: RE: Page Tracking & hits :: User Movments
> on an Intranet
> > > >
> > > > The anonymous way would be to assign a random ID to each new visitor
> > and
> > > > then record that ID with every page view (or fuseaction) into a
> > database
> > > > or text file.
> > > >
> > > > The membership-based way would be to have a user login & then track
> > them
> > > > the same way.
> > > >
> > > > --------------------------------------------------------------
> > > > Mark Warrick
> > > > Phone: (714) 547-5386
> > > > Efax.com Fax: (801) 730-7289
> > > > Personal Email: [EMAIL PROTECTED]
> > > > Personal URL: http://www.warrick.net
> > > > Business Email: [EMAIL PROTECTED]
> > > > Business URL: http://www.fusioneers.com
> > > > ICQ: 346566
> > > > --------------------------------------------------------------
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Paul Ihrig [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, December 20, 2000 5:47 AM
> > > > > To: CF-Talk
> > > > > Subject: Page Tracking & hits :: User Movments on an Intranet
> > > > >
> > > > >
> > > > > hello all!
> > > > > i know this has been asked befor, but i cant find the email.
> > > > >
> > > > > What software or utilities do you guys use to track user
> movments on
> > > > your
> > > > > site?
> > > > > i need to see what parts of our intranet are really being
> utalized &
> > > > what
> > > > > isnt.
> > > > >
> > > > > so i can do a rebuild.
> > > > >
> > > > > any helpp would be great!
> > > > >
> > > > > thank you
> > > > >
> > > > > -paul
> > > > >
> > > > > Web Developer, NBBJ
> > > > > Work: [EMAIL PROTECTED]
> > > > > 614 241-3534
> > > > >
> > > > > Home: [EMAIL PROTECTED]
> > > > > 614 449-1681
> > > > >
> > > > > [EMAIL PROTECTED]
> > > > > icq: 47658358
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists