Forum Moderators: DixonJones

Message Too Old, No Replies

PHP, how to track ref= info coming into site?

         

cgchris99

4:02 am on Sep 5, 2003 (gmt 0)

10+ Year Member



Is there a script(PHP) out there that will help me track the traffic being referred via Adwords and Overture?

I know if I get a new customer from one of these links and I also know if the place an order.

But I would like to know how much traffic is coming from the link. Adwords & Overture are supposed to track this, but I would like my own indicator.

Thanks for any info

mincklerstraat

7:38 am on Sep 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want a pre-written one, search hotscripts.com for PHP and referers, and then try PHP and referrers (first is HTTP protocol - second is proper English). If you wanna write your own, look at [php.net...] . If you run PHP version 4.1 or later, the variable you want to check is $_SERVER['HTTP_REFERER'], and make sure if you do a database query that you check or clean this since it can be used to hack a site via SQL injection. If you run older PHP than this, get a host that has upgraded ... (or else it's $HTTP_SERVER_VARS['HTTP_REFERER'], and you'll have to globalize $HTTP_SERVER_VARS first -- but still, go to a host that has upgraded! Your host should give you free service if you're less than 4.1).