Integration with ShopSite is made by placing sale tracking script into the order confirmation page.

1.

Log in to your ShopSite Admin Center and click on Commerce -> Order System -> Thank You and insert the integration code to Text at the bottom of the Thank You screen: section.

2.

Per order tracking code

If you wish to create 1 commission per each order so you don't want to have different commission values for different products use this code:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script> 
<script type="text/javascript">PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost(ss_subtotal);
sale.setOrderID(ss_ordernum);
sale.setProductID(ss_sku.join(', '));
if (typeof ss_coupon_name !== 'undefined') {
  sale.setCoupon(ss_coupon_name);
}
sale.setData1(ss_email);

PostAffTracker.register();
</script>

3.

Per product tracking code

If you wish to define different commissions for different products then use this code:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script> 
<script type="text/javascript">PostAffTracker.setAccountId('Account_ID');
var sale = [];
var discountPercentage = 1;
if (typeof ss_coupon_discount !== 'undefined') {
  var discountValue = Math.abs(Number(ss_coupon_discount));
  discountPercentage = 1 - (discountValue / (Number(ss_subtotal) + discountValue));
}
for (i = 0; i < ss_sku.length; i++) {
  sale[i] = PostAffTracker.createSale();
  sale[i].setTotalCost(ss_price[i] * ss_quantity[i] * discountPercentage);
  sale[i].setOrderID(ss_ordernum + '(' + i + ')');
  sale[i].setProductID(ss_sku[i]);
  sale[i].setData1(ss_email);
  if (typeof ss_coupon_name !== 'undefined') {
    sale[i].setCoupon(ss_coupon_name);
  }
  if (i != ss_sku.length) {
    sale[i].doNotDeleteCookies();
  }
}
PostAffTracker.register();
</script>

4.

Click tracking integration

To be able to track sales also the clicks must be tracked to create a relation between customers and affiliates. You can get the click tracking code from your merchant panel from Tools -> Integration -> Clicks tracking. You should add the code to Preferences -> Layout Settings -> Footer section of ShopSite.
Alternatively if you are not using the Footer in your template you can add the code to Preferences -> Layout Settings -> Text A or Text B.


This is all that is required. Now whenever there's sale, ShopSite will call our sale tracking script, and system will generate commission for the affiliate.