How to find where visitors come from after home page?

D

Dan

If a visitor first accesses my site on home page, I know where they come
from, e.g., links from google, yahoo, or other site. But once they click my
other pages from home page, I lose track of the initial click through info.
I want to tag/know where visitors come from no matter what page they view on
my site. Is there a way to do that? Thanks a million.
 
K

Kevin Spencer

Not enough info. HOW do you "know where they come from?" Why don't you have
this information after they click to other pages from the home page?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
J

Jon Spivey

Hi Dan,
On my sites I have a database to track users with these fields
UserID - Identity
Browser
IP
Referer
Visits

Each time a new session starts I run code that does this

if user has been here before (check for userid cookie)
add 1 to visits
update referer
else
set a cookie with userid - set IP and referer fields set visits to 1
end if



This way you can get a good overview of where your users are coming from and
how many times they return - you could also track each page view if you
wanted. Another good idea is to track 404s for favicon.ico - this will give
you the number of users that add you to their favourites and which specific
page they bookmarked. Stats packages are all well and good but I like to
track this info myself.

If you can tell us what programming language you're using we can probably
give you more specific help.
 
C

clintonG

The only way to track pages requires using a scripted object model
such as ASP scripted using VBScript. All pages in the web must be
named using the .asp file extension or it will not be possible to use the
ASP objects such as the Request object to get data from page to page.

Into the top of each page you include the following

<%
dim sRecordedWhen
dim sThisPage
dim sThisPageRequestedFrom

sRecordedWhen = Now( )
sThisPage = Request.ServerVariables("URL")
sThisPageRequestedFrom = Request.ServerVariables("HTTP_REFERER")
%>

There's other refinements and reasons why there may not be any
data in the HTTP_REFERER variable but that's the gist of it Dan.


--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 
K

Kevin Spencer

There is another way. Have IIS log the information you want to keep track
of. Tracking programs like WebTrends read this data to create their reports.
Or, if you have the money, and want to make it easy, use WebTrends or
another tracking package.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
K

Kevin Spencer

Hey, Clinton, I wasn't nitpicking. There's nothing wrong with your idea. I
simply presented another. :)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
C

clintonG

Hope it all helped you implement a solution and thanks for not
being one of those knobs that posts a question and sits back
laying in the weeds never to return while others respond and argue :)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top