Author Topic: Finding out where someone found the link to your site  (Read 1767 times)

Offline Qwerty

  • Level 12
  • *
  • Posts: 90
  • Reputation: +0/-0
    • View Profile
Finding out where someone found the link to your site
« on: January 20, 2009, 04:49:41 AM »
Ok, you being the owner of a online game would want to know where your users are comming from, and there is an easy way to do that without adding ?red=http://www.somewhere.com to the address.

Nearly all browsers send the referal link to the server, and the server stores this in the PHP global variable $_SERVER['HTTP_REFERER']. And all you need to do is store that information in a file or database, and keep a tally of each referal.

Easy
- "I sentance you to life"
- "You moron I'm already alive"

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #1 on: January 20, 2009, 06:47:29 AM »
Just be aware that any information received from the browser may be fabricated with malicious intent. But, yes, this is the most effective method of determining referrals.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Scion

  • Level 27
  • **
  • Posts: 402
  • Reputation: +11/-0
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #2 on: January 20, 2009, 07:45:20 AM »
Isnt this information also included in Apache's log files?

Why bother writing it yourself again when its already done for you?


Offline Qwerty

  • Level 12
  • *
  • Posts: 90
  • Reputation: +0/-0
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #3 on: January 20, 2009, 07:59:39 AM »
On some hosting services, you don't get access to the Apache logs
- "I sentance you to life"
- "You moron I'm already alive"

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #4 on: January 20, 2009, 08:35:19 AM »
Additionally, if you're creating your own ad system, you may find it easier to store in a database as opposed to reading the log file.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline bbgames

  • Level 16
  • *
  • Posts: 138
  • Reputation: +1/-0
    • View Profile
    • Building Browsergames
Re: Finding out where someone found the link to your site
« Reply #5 on: January 20, 2009, 10:20:04 AM »
For this sort of thing, I've always been a fan of using a logfile analyzer like awstats - although if you don't have access to your log files and your webhost won't install it for you, you're sort of stuck without it.

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #6 on: January 20, 2009, 10:23:11 AM »
correct me if i am wrong being a newbie and all to gaming, but i have had various sites, blogs etc using joomla and wordpress, and the one thing that has remained constant was that every host I have ever used had either cpanel or something similiar which had built in awstats, or some other form of traffic analyzer
People Like You, Are the Reason People Like Me Need Medication

Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Finding out where someone found the link to your site
« Reply #7 on: January 20, 2009, 01:12:13 PM »
You could also use google Analitics :).

Offline Qwerty

  • Level 12
  • *
  • Posts: 90
  • Reputation: +0/-0
    • View Profile
Re: Finding out where someone found the link to your site
« Reply #8 on: January 20, 2009, 04:41:07 PM »
You might like to intergrate this information into your own administration panel if you have one, rather than the hosting accounts.
- "I sentance you to life"
- "You moron I'm already alive"

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal