473,663 Members | 2,876 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

document.referr er question for tracking hits and visits

I'm using document.referr er method for tracking visits on my site. But it
seems that, when someone finds my site with google, this method returns
only:
"google.com/search?q=xxxxx" (good)
or
"google.com/search?hl=en" (bad)
or
"google.com/search?sourceid =navclient" (bad)

That meens, it returns only first parameter sent to google. "hl" defines
language and is used very often. BUT I want to see key words also (variable
"q").
Has anyone noticed that... or have any idea for the solution?

Thanks

Goran


Jul 23 '05 #1
9 3075
In article <c9*********@ba gan.srce.hr>, ja*********@yah oo.com
enlightened us with...

That meens, it returns only first parameter sent to google. "hl" defines
language and is used very often. BUT I want to see key words also (variable
"q").
Has anyone noticed that... or have any idea for the solution?


My web server has a control panel that tracks all of that and more.
Check with your web host to see if they have a stats area.

document.referr er is not reliable.

--
--
~kaeli~
Press any key...NO, NO, NO, NOT THAT ONE!!!!!!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
On Tue, 25 May 2004 15:19:11 -0500, kaeli wrote:
In article, ja*********@yah oo.com enlightened us with...

That meens, it returns only first parameter sent to google. "hl" defines
language and is used very often. BUT I want to see key words also
.... My web server has a control panel that tracks all of that and more.
Check with your web host to see if they have a stats area.

document.referr er is not reliable.


I thought that is where the server got
the information for the logs ..they will
be the same information won't they?

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #3
In article <1n************ *************** **@40tude.net>,
Se********@www. invalid enlightened us with...

document.referr er is not reliable.


I thought that is where the server got
the information for the logs ..they will
be the same information won't they?


Yes and no. Users (well, script kiddie types with nothing better to do)
can modify the referrer if you rely on script. They can't change what
the server sent in the headers. The OP was talking about getting the
values from javascript.

I meant that statement as an aside, though. I was mostly adressing the
fact that my host server tracks things like keywords used to get to your
site. The OP said
"That meens, it returns only first parameter sent to google. "hl"
defines language and is used very often. BUT I want to see key words
also (variable"q")."

My server tracks keywords used from all the major search engines.
Whether it uses referrer or not is a black box for me. I just get the
stats. And I get tons of stats. A lot of paid hosts have stats as part
of the package. It's nice.

--
--
~kaeli~
If that phone was up your a$$, maybe you could drive a
little better!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4
Lee
goks said:

I'm using document.referr er method for tracking visits on my site. But it
seems that, when someone finds my site with google, this method returns
only:
"google.com/search?q=xxxxx" (good)
or
"google.com/search?hl=en" (bad)
or
"google.com/search?sourceid =navclient" (bad)


Is that the full value of document.referr er, or do you do
some processing to the string that might be inadvertently
truncating it at the first ampersand?

As pointed out, though, it's usually much simpler to do
that sort of tracking with server logs and/or statistics.

Jul 23 '05 #5

"kaeli" <ti******@NOSPA M.comcast.net> wrote in message
news:MP******** *************** *@nntp.lucent.c om...
In article <c9*********@ba gan.srce.hr>, ja*********@yah oo.com
enlightened us with...

That meens, it returns only first parameter sent to google. "hl" defines
language and is used very often. BUT I want to see key words also (variable "q").
Has anyone noticed that... or have any idea for the solution?

My web server has a control panel that tracks all of that and more.
Check with your web host to see if they have a stats area.


Nop. Free web space from my ISP. No ASP no CGI no writing no database...
that's why I want to track it from the outside. Main reason is fun and
learning :))

document.referr er is not reliable.

--
--
~kaeli~
Press any key...NO, NO, NO, NOT THAT ONE!!!!!!
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6

"Lee" <RE************ **@cox.net> wrote in message
news:c9******** *@drn.newsguy.c om...
goks said:

I'm using document.referr er method for tracking visits on my site. But it
seems that, when someone finds my site with google, this method returns
only:
"google.com/search?q=xxxxx" (good)
or
"google.com/search?hl=en" (bad)
or
"google.com/search?sourceid =navclient" (bad)
Is that the full value of document.referr er, or do you do
some processing to the string that might be inadvertently
truncating it at the first ampersand?


This is my javascript:
<script language="JavaS cript" type="text/javascript">
var sRefer = "refer=" + document.referr er;
var sURL = "&url=" + document.URL;
document.write( "<img src='xxx/counter.asp?" + sRefer + sURL + "' width=1
height=1 border=0 alt=''>");
</script>

Inside ASP:
var sRefer = "" + Request.QuerySt ring( 'refer' );
var sPage = "" + Request.QuerySt ring ( 'url' );

URL is always processed OK.
As pointed out, though, it's usually much simpler to do
that sort of tracking with server logs and/or statistics.


The fact is that I have a free web space from my ISP, but it doesn't allow
any active pages such as ASP or CGI. So I'm using other site with ASP and
database support to track visits on my noASP site.
Jul 23 '05 #7

"goks" <ja*********@ya hoo.com> wrote in message
news:c9******** **@bagan.srce.h r...

"Lee" <RE************ **@cox.net> wrote in message
news:c9******** *@drn.newsguy.c om...
goks said:

I'm using document.referr er method for tracking visits on my site. But itseems that, when someone finds my site with google, this method returns
only:
"google.com/search?q=xxxxx" (good)
or
"google.com/search?hl=en" (bad)
or
"google.com/search?sourceid =navclient" (bad)
Is that the full value of document.referr er, or do you do
some processing to the string that might be inadvertently
truncating it at the first ampersand?


Ha ha :)
After I posted this I've figured it out... off course.... second ampersand
is
taken as another variable. I just have to replace it in variable "refer"
with something else... like / :))
Thanks
This is my javascript:
<script language="JavaS cript" type="text/javascript">
var sRefer = "refer=" + document.referr er;
var sURL = "&url=" + document.URL;
document.write( "<img src='xxx/counter.asp?" + sRefer + sURL + "' width=1
height=1 border=0 alt=''>");
</script>

Inside ASP:
var sRefer = "" + Request.QuerySt ring( 'refer' );
var sPage = "" + Request.QuerySt ring ( 'url' );

URL is always processed OK.
As pointed out, though, it's usually much simpler to do
that sort of tracking with server logs and/or statistics.


The fact is that I have a free web space from my ISP, but it doesn't allow
any active pages such as ASP or CGI. So I'm using other site with ASP and
database support to track visits on my noASP site.


Jul 23 '05 #8
On Tue, 25 May 2004 15:53:40 -0500, kaeli wrote:
In article <1n************ *************** **@40tude.net>,
Se********@www. invalid enlightened us with...

document.referr er is not reliable.
I thought that is where the server got
the information for the logs

.... Yes and no. Users (well, script kiddie types with nothing better to do)
can modify the referrer if you rely on script.


I see what you mean now, thanks..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #9
kaeli wrote:
My server tracks keywords used from all the major search engines.
Whether it uses referrer or not is a black box for me.


I don't see any alternative to that.
PointedEars
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
13206
by: Hugo Sousa | last post by:
Hello, I have a page that cannot be accessed by typing is url. It should only be accessed by a link in another web page. The following scrip works fine: <script> <!-- var validreferrals=new Array() validreferrals="http://pdc/test/index.htm" validreferrals="http://pdc/test/index2.htm"
1
2986
by: kuok benny | last post by:
Hi, I am trying to use the document.referrer to get the referrer of my home page. Occationally, I get the value of 'blockedReferrer'. Actually how this happen, how the client blocked the function of document.referrer. I just want to verify how this could be done within the browser e.g. IE, Netcape and so on... what Internet option have them activate or not activate to make me to have the value 'blockedReferrer'? Thanks in advance.
9
14404
by: Frances Del Rio | last post by:
if I put alert(document.referrer) in code of a file that was linked from another it returns blank... pls, need to get document.referrer, don't why it's not working... read up on oreilly, don't know what I'm doing wrong.. thank you.. Frances
2
2370
by: Goober | last post by:
I have to determine the document.referrer of the individual coming to my site. I want to send everyone not coming from one of those sites to an alternate location (The names below are just used as examples). I want to match on one of those names anywhere in the document.referrer. In the main program I call a subroutine like this: <script LANGUAGE="javascript" SRC="../js/redirect.js"></script> <body leftmargin="0" rightmargin="0"...
2
10276
by: X l e c t r i c | last post by:
Hi, I'm trying to put the last URL visited to a text input using history.previous for WebTV (because I can't get document.referrer to work with WebTV) and document.referrer for PC. This is for my Web Resources page. Where if I go straight to it from an image that I want to edit with an online imaging tool, or if I go straight to it from a page that I want to validate, I can put the URL to the text input of the portal I want to use.
1
2766
by: Mike Dee | last post by:
Hi All - I'm having a strange problem I'm wondering if anyone can shed some light on. When I use ASP or ASP.NET code to get the referrer information from the server side, it comes back as null. However in these same cases document.referrer returns the valid referrer. What could cause this? In other words, with the following line: ref = Request.ServerVariables("HTTP_REFERER") (or its ASP.NET equivalent)
5
11011
by: Nospam | last post by:
does anyone know if there is anything wrong with this code? <SCRIPT LANGUAGE="JavaScript">document.referrer.indexOf("http://www.example.com") != -1){ document.write("http://www.example.com/image1.jpg")} </SCRIPT> ?
1
2147
by: gocre8 | last post by:
hope someone can advise! . . . i'm using this code... <SCRIPT LANGUAGE="JavaScript"> document.write("<INPUT type=hidden NAME=referrer VALUE=" + 'document.referrer' + ">"); </SCRIPT> to generate a hidden field to be submitted with a php formmail script, so i know from which url the visitor has filled in the form. this works well, except for the fact that the url is truncated/corrupted in some way at the end so this....
0
8436
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.