[thelist] RE: Re: Tracking Webpages

Ben Gustafson Ben_Gustafson at lionbridge.com
Fri Feb 15 13:02:00 CST 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--
[ Picked text/plain from multipart/alternative ]


> Thanks for all the comments!
>
> To answer some of the questions, I am an asp programmer, I
> think I will
> suggest something like web trends (Just need prices now!),
> The best you can
> get about a user is an IP no and with dynamic IP's this is fairly
> meaningless! Hope I covered everyones comments..
>
> Thanks Mark

That reminds me of a tip:

<tip type="storing referers in cookies" author="Ben Gustafson">
The HTTP_REFERER header contains the URL of the page that "referred" you to
(i.e., contained a link to) the page you're on now. It's most useful for
finding out how visitors got to your site, and can be logged in your server
log files. But once that visitor clicks on a link in your site, their
HTTP_REFERER becomes the page on your site that contained the link, thus
blowing away the "real" external referer information for that visitor.

If you want to be able to tell how a visitor first came to your site
sometime after their initial visit, you can store that info in a cookie when
they first hit your site, and request the cookie when they, say, fill out a
registration form. The script you use to set the cookie should not overwrite
it if it already exists. Below is the method I use in ASP/JavaScript, and
put in an ASP include file:

-----
<%
	var ref = String(Request.ServerVariables("HTTP_REFERER"));
%>

<SCRIPT LANGUAGE="JavaScript1.2" SRC="/include/cookie_functions.js"
TYPE="text/javascript"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript"><!--
var ref = "<%=ref%>";
if (ref != "undefined") // is undefined if the visitor typed in the URL
	// "false" parameter passed not to overwrite existing cookie:
	WM_setCookie("ref", "<%=ref%>", 18760, "/", "mysite.com", false);
//--></SCRIPT>
-----

I use the WM_setCookie function from WebMonkey, which I modified not to
overwrite an existing cookie.
http://hotwired.lycos.com/webmonkey/reference/javascript_code_library/wm_cki
e_lib/

</tip>

--Ben




More information about the thelist mailing list