I'm looking for a programmer to make a conversion tracker for a small ad agency of mine. Below is the current code we use, its written in PHP but it only works 40-50% of the time. I'm wondering if there's a different way to do it. We've also tried tracking IP's the problem is server strain. If someone can come up with a better idea, please PM me with your msn/aim and payment details. We've tried doing it by ip. The problem is that query's our DB every time someone signs up to some VERY large games. We need to find a different solution that is not so server intensive. <? /* This two line code segment is how the cookie is placed on the out.banner page, containing three variable used for updating the database later $cokee="{$global_owner}x{$global_publisher}x{$banner['ad_id']}"; setcookie ("aygc",$cokee,time()+259200,"/",".advertiseyourgame.com",false,false); */ //The following is the PHP page which is called at conversion if($_COOKIE['aygc']) { $global_day = date("j"); $global_month = date("F"); $global_year = date("Y"); $global_ipaddress = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $detail = split("x", $_COOKIE['aygc']); mysql_query("INSERT INTO conversions VALUES ('', unix_timestamp(),'$detail[0]', '$detail[1]', '$detail[2]', '$global_ipaddress')"); mysql_query("UPDATE system_daily SET conversions=conversions+1 WHERE ID={$detail[0]} AND pub_id={$detail[1]} AND day='$global_day' AND month='$global_month' AND year='$global_year' AND type='pub'"); mysql_query("UPDATE system_daily SET conversions=conversions+1 WHERE pub_id={$detail[2]} AND day='$global_day' AND month='$global_month' AND year='$global_year' AND type='ad'"); } ?> Code (markup):
Still looking for a solution to this problem. Please PM me with your msn's and quotes. I'm willing to spend whatever it takes to make this work.