PDA

View Full Version : trade script fucked!


sandman
08-22-2004, 04:08 AM
my install is not counting clicks from trades you have my domain and all login info please fix asap im feeding site and would like to stop trading raw!

Mathew
08-22-2004, 07:47 PM
okay
first, from what I can imagine your site wasn't trading raw, because out script was still able to read/write cookie about where it sent your surfer.


ok and here goes the difficult part.

a cookie besides name, content and expire parameters has also path and domain parameters. path and domain determines from where the set cookie can be read.

in your case, you signed up to all your trades entering your url as http://www.domain.com/ from what I can tell. Your category pages on the other hand, used http://domain.com/out.php to reference outscript.

Since the "in" cookie (which tracks the reffering trader) is set from domain www.domain.com, and cannot be read from domain.com, that was the reason why you were having so many nocookie clicks. Btw did you noticed that some clicks still passed through? Those were made on your mainpage, on the links below the pics.

So temporarily I solved this problem by putting a string in a code which tells index.php to write cookie readable by domain.com.. But that's not the best way for several reasons.

The best way is to obey HTML specification. IE reference siteroot as / not as http://domain.com/ . or at least reference as http://www.domain.com/out.php - because cookie written by domain.com will be always readable by www.domain.com and domain.com (granted, anything.domain.com) but cookie written by www.domain.com will be only readable by www.domain.com.


So at the moment just for scientific fun, edit your category pages to reference out.php as /out.php .