Home Integration Methods General solution

General solution

Post Affiliate Pro is compatible with nearly ALL merchant accounts, payment gateways, shopping carts and membership systems.

What integration means
Integration is a way to connect the affiliate system to your current website, shopping cart or payment gateway in a way that affiliate system will be notified about purchases. When notified, affiliate system registers the sale, finds referring affiliate (if any) and creates appropriate commission for him.

The general method of integration is putting an invisible JavaScript code or image anywhere in the "thank you for order" or order confirmation page that is displayed to the customer after the payment is processed.
1
JavaScript integration code
JavaScript version of integration code is generally recommended, because it allows using advanced tracking techniques.

Open your order confirmation or "thank you for order" page template, and put the following code somewhere onto the page
where the parameters in setTotalCost(), setOrderID() and setProductID() should be replaced with correct values.
Total Cost (mandatory for % commissions) - price of the product
Order ID (optional) - can be your unique generated order ID to cross-check the sale.
Product ID (optional) - the ID of the product bought.

All fields are optional, but without Total Cost system will be not able to compute percentage commissions. Also, Product ID is required if you want to recognize campaign by product.

If you need to set total sale cost and order id, but you don't have access to their values in your "Thank you" page, the situation is more complicated. There is no general solution for this. If you know that you can register sale in some other place, where those values (total cost and order id) are available, you can put the tracking code there. Otherwise, consult us for advice and finding possible solution.
2
Hidden Image integration code
Image version of integration code can be used if for some reason you cannot or don't want to use JavaScript tracking.
The parameters TotalCost, OrderID and ProductID have the same sense as in JavaScript code.
These two methods (JavaScript and Hidden Image) do the same, JavaScript version has slightly better reliability because of more advanced techniques tha can be used.

This is all that is required. Now whenever there's sale, the sale tracking script sale.php is called, and it will generate commission for the affiliate.

Security?

6 years ago M.DItt
Are the JavaScript function secure in the sense of cheating?

E.g. is it possible to set total cost, order and product id on the client side?

Can somebody (a customer helping an affiliate) stop Javascript, then change the Total Cost Value, then send the Javascript to increase to comission?


Or, on the other hand, is it possible to send the data directly by the Web backend to PAP, so that PAP knows that the data is not manipulated?

Thank You

security is same as security of your website content

6 years ago Viktor Zeman
Yes, javascript functions are secure in same way as content of your website.
In case your website was attacked and somebody has power to change content of your website, than he can modify also javascript on your website.

backend

6 years ago Viktor Zeman
I forgot to answer your second question:
Yes, you can register sale also by API (see our knowledgebase for details).
In this way is used no javascript, but you loose option to use flash cookies for tracking of sale - only browser cookies will be used for tracking of sale in case sale will be registerred by API call.

What about firebug>

6 years ago Alex
You can execute those same JS statements in firebug.

var sale = PostAffTracker.createSale();
sale.setTotalCost('120.50');
sale.setOrderID('ORD_12345XYZ');
sale.setProductID('test product');

PostAffTracker.register();

Setting the values to whatever you want. It will then register with your php affiliate script...

Bleh

6 years ago Parnell Springmeyer
I'm being forced to use this software. So everyone knows, the javascript is not a secure method.

I'm personally just submitting a GET request to the sales tracking php script from within my own application to avoid any of that gooferyness.

Sale API

6 years ago Viktor Zeman
In case you think Javascript is not sure enough for you, you can use API to track sales and clicks.
Description you will find in our knowledgebase: http://support.qualityunit.com/knowledgebase/post-affiliate-pro/programmers-documentation/api/tracking-api.html

Several items

5 years ago Alex MG
Hello,

What if several items were ordered? What should we put under setProductID?

GoDaddy Shopping Cart

3 years ago David
I use GoDaddy Shopping Cart.

Do I add this to the INVOICE HEADER or ??

Thank you.

No entiendo

9 months ago Fanny
Hola,

Los parámetros setTotalCost(), al parecer es un importe estándar lo que no refleja el valor real de esa venta, por eso no le permite al afiliado saber con exactitud el valor de la venta generada. Seria posible un codigo script que capte el valor total real de la venta y que se le asigne al afiliado correspondiente?

Gracias!