PDA

View Full Version : Sales tracking not working... need help


autopia
4th August 2004, 06:46 PM
Hey everyone. I purchased and installed POST Affiliate Pro last night and I'm trying to track down a problem with my configuration.

The installation went fine, and I believe I followed all of the setup steps correctly. I have created a category, a test text link, and an a test affiliate account. The commission for the product is setup to receive credit for both clicks and sales. An amount is assigned to the click and the sale. I created an affiliate test page, a test landing page, and a test checkout page.

Here's the issue:

1. When the text ad is clicked, the click is recorded in the transaction table. The IP address is recorded correctly, but the referrer domain is rarely recorded. CookieStatus=1, Status=2.

2. When I go to the test "sale" page, the sale is not recorded. I edited the debug statements in sale.php to make them echo to the browser. I'm hitting the "Sale registration: Data not decoded, failed to save sale" error message.

This leads me to believe I have a cookie problem (duh!). How do I solve this issue? Is there a cookie domain setting I missed?

Thanks,
David

mark
4th August 2004, 08:29 PM
Hi,

you did not need to edit the debug commands, if you turn on the Debug transactions in merchant panel Settings, you would be able to see all debug messages in History.

However, it seems it is a cookie problem.
Do you have the sale page on different domain or subdomain?
POST Affiliate Pro is not setting any domain when saving the cookie, so it will work only on the same domain as where the click was registered.

If you have different subdomains, then you should change it. You have to edit /scripts/ClickRegistrator.class.php
and put domain parameter into the setcookie() function (line 40).

original code:

$this->cookieSetReturn = setcookie(COOKIE_NAME, $value, $this->cookieLifetime, '/');


changed code, cookie will be readable on all subdomains of yoursite.com:

$this->cookieSetReturn = setcookie(COOKIE_NAME, $value, $this->cookieLifetime, '/', '.yoursite.com');


If you'll have any problems with this let me know.

regards,

mark

autopia
4th August 2004, 09:00 PM
Mark,

I found the error log later in the evening. Great tool, now that I know it's there.

Yes, my stores and my corporte site are on different domains. I have multiple Yahoo stores feeding into my backend server. I will be updating the transaction record with the correct sale amount and order ID number by matching the IP address. The Yahoo stores post the information to my secure server, and my application parses the data into tables and applies business logic for processing.

I will give your update a try.

If I come up with a generic solution for integrating Yahoo stores I will pass it along.

David

autopia
5th August 2004, 12:06 AM
Mark,

No joy with this solution. Clicks are being logged multiple times from the same source, but sales are not logged at all.

What next?

db

BTW, here is the cookie being written:

POSTAff2Cookie
2_3
theperfectshine.com/
1536
3129802368
30387867
240414960
29653615
*

My store domain is autopia-carcare.com and my backend system is theperfectshine.com.