Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add Refferer code to url

Status
Not open for further replies.

tonyx666

MIS
Apr 13, 2006
214
GB
hi, my website is


i have my link on various pages. my website statistics however dont always tell me where my visitors have come from..

is there any way that i can add a simple bit of code to the end of the url so i know that the visitor has come from a certain site..

eg..

in my link, the url ill use
or something like that..?? this way when i check the website stats i can clearly see where each hit has come from???
 
Yes



Just like that.
But you need to have something on your site that catches those referer values and does something with them. To do this you will need to use a server side language such as PHP, ASP or ColdFusion.

It's not hard to do and can be taken to a number of levels of complexity.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
ok, i have microsoft hosting and use asp.

if i create the link url in the way you suggested, cant i just place my 'counter' code on the page and read it like that...

or will i have to include some additional code on the page?
 
Whatever you might need do, it will be best explained in forum333.
 
Before you go to forum333
What's your "counter code"? That's the point isn't it?

Your "counter code" must look at parameter in the querystring and do something

I guess you could just monitor your logfiles for the presence of different values but that's going to be clunky and open to abuse.

Best way is to grab the info, log it somehow and then forward the visitor on the relevant page (or rewrite the url) without them ever knowing.

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top