referer in a frame

G

Giuseppe

I need to make a little software to know how many visitors see my websites,
and where they come from.
So I've added this code at the end of a webpage:

<!------- Begin Stat code ------------->
<script language="JavaScript">
var path = 'http://www.mysite.com/webform1.aspx';
document.write('<img height=1 width=1 border=0 src="');
document.write(path);
document.write('?referer=');
document.write(escape(document.referrer));
document.write('">');
</script>
<noscript>
<img height=0 width=0 src=path>
</noscript>
<!------- End Stat code ------------->

I have an asp.net page (webform1.aspx) that is executed by this script and
it records all the information I need.
I think everything is ok, but the page I want to count is on
www.geocities.com and it fills users webpages in frames to show advertising.

in my database it saves:

I think because for geocities "site/?20057" is my html page in wich I put
the javascript, and "site/" is the main page with javascript.
Am I right?
How can I record the real referrer?

Please help me...
 
D

David Dorward

Giuseppe said:
I need to make a little software to know how many visitors see my
websites, and where they come from.

I don't know any web server which doesn't do that by default. Why not just
grep your server logs?
in my database it saves:

I think because for geocities "site/?20057" is my html page in wich I put
the javascript, and "site/" is the main page with javascript.
Am I right?
How can I record the real referrer?

That is the real referrer - you want the referer's referer, which the
browser doesn't provide you with available.
 
G

Giuseppe

"David Dorward" ha scritto nel messaggio
I don't know any web server which doesn't do that by default. Why not just
grep your server logs?


That is the real referrer - you want the referer's referer, which the
browser doesn't provide you with available.


with "document.write(escape(parent.document.referrer));" maybe it is ok!
 
G

Giuseppe

"Giuseppe" ha scritto nel messaggio
with "document.write(escape(parent.document.referrer));" maybe it is ok!


....unless the referre is a geocities page itself.
I can't understand why.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top