PC Review


Reply
Thread Tools Rate Thread

Can someone suggest a cookie?

 
 
Steve Grosz
Guest
Posts: n/a
 
      13th Jun 2004
I'm trying to track if visitors to a website are new or repeat by having
a cookie set on their PC and then checking to see if its there.

I'm not sure how to do this, I don't need to record their name, etc,
just if they've visited.

Can someone suggest a way to do this? The IIS logfile analysis tool I
use, WebTrends, can use the info from that cookie, but I just need to
tell it the name, etc, then it will tell me if someone is a repeat
visitor or a brand new one.

Thanks a bunch! :-)

Steve
 
Reply With Quote
 
 
 
 
Jim Buyens
Guest
Posts: n/a
 
      13th Jun 2004
Typically, you would add the following ASP statement to
each page you care about.

<%
Response.Cookies("beenhere") = "donethis"
Response.Cookies("beenhere").Expires = "July 31, 2004"
%>

Then, to check for a return visitor, you would code
something like:

<%
If "" & Request.Cookies("beeenhere") = "" Then
Response.Write "Hello new visitor!"
Else
Response.Write "Welcome back!"
End If
%>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------



>-----Original Message-----
>I'm trying to track if visitors to a website are new or

repeat by having
>a cookie set on their PC and then checking to see if its

there.
>
>I'm not sure how to do this, I don't need to record

their name, etc,
>just if they've visited.
>
>Can someone suggest a way to do this? The IIS logfile

analysis tool I
>use, WebTrends, can use the info from that cookie, but I

just need to
>tell it the name, etc, then it will tell me if someone

is a repeat
>visitor or a brand new one.
>
>Thanks a bunch! :-)
>
>Steve
>.
>

 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      13th Jun 2004
When my host used WebTrends, it automatically created it's own cookie that indentified if a user was
a return visitor based on IP address, with the exception of AOL users, which basically all have the
same IP address.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Steve Grosz" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> I'm trying to track if visitors to a website are new or repeat by having
> a cookie set on their PC and then checking to see if its there.
>
> I'm not sure how to do this, I don't need to record their name, etc,
> just if they've visited.
>
> Can someone suggest a way to do this? The IIS logfile analysis tool I
> use, WebTrends, can use the info from that cookie, but I just need to
> tell it the name, etc, then it will tell me if someone is a repeat
> visitor or a brand new one.
>
> Thanks a bunch! :-)
>
> Steve



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cookie contanier does not correctly parse Set-Cookie header with domain token dav Microsoft Dot NET Framework 2 15th Dec 2010 08:55 AM
cookie contanier does not correctly parse set cookie header with domain token dav Microsoft Dot NET Framework 0 12th Aug 2007 09:06 AM
Cookie Question (IP as domain and cookie file location) =?Utf-8?B?UGF1bA==?= Microsoft ASP .NET 1 10th Jan 2006 08:37 PM
Any downsides to cookie assignment inside custom class using HttpContext.Current? ASP.NET 2.0 cookie fix? Microsoft ASP .NET 2 17th Aug 2005 07:43 AM
Transient-Cookie/Session-Cookie and multiple browser instances X Windows XP Internet Explorer 7 29th Apr 2004 11:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:07 AM.