View Full Version : Referring URL

07-09-2006, 05:40 AM

I don't know too much about Javascript. I have undertaken a massive project where I use one of the scripts I found on javascriptkit.com to generate random links from a list I have (the website is http://bestestblogofalltime.blogspot.com)

The problem I am having is that when the Random Blog button referrers someone to another website, my site is not getting the credit for the referral in site statistic programs such as Sitemeter and Statcounter.

Is there anyway I can edit the script so that these websites I am referring to give me credit. Or, maybe there's completely new code (javascript or not) that I could use to achieve this goal.

Thanks a bunch!

07-10-2006, 12:31 AM
the problem may be that the sites that you want credit for send a person to require a variable within the window location value. and the variable would be the address of your site. this method is a bit old and many sites have gone to using server side scripting, which allows them to detect where the user came from and keep a record or database of this information, but none the less some older methods are still in use to this day.

and i went and looked at your source code. even though it may work, you only have <script> </script> tags. if using javascript, it is preffered that you specify this within the script tag. <script type="text/javascript"> or <script language="javascript">. the second one is out dated but still works.