If you pay different commission for different products, you will probably need this modified sale tracking script:
More info can be found here:
https://demo.postaffiliatepro.com/samples_tests/sale_tracking_docu.php
The generated JavaScript code will look like this (for two items):
<script id="pap_x2s6df8d" src="https://URL.postaffiliatepro.com/scripts/trackjs.js" type="text/javascript"> </script> <script type="text/javascript"> <?php for ($j=0; $j<=$items; $j++){ $pap_final_price[$j] = $order_item_price[$j] * $order_item_quantity[$j]; echo "var sale".$j." = PostAffTracker.createSale();\n". "sale".$j.".setTotalCost('". $pap_final_price[$j]."');\n". "sale".$j.".setOrderID('".$order_id. "_" . $j . "');\n". "sale".$j.".setProductID('".$order_product_id[$j]."');\n\n"; } ?> PostAffTracker.register(); </script>As you can see, the php code is used here. The code will generate JavaScript sale tracking code for multiple sale. You can add there any additional parameter such as setData1() or setCustomCommission()
More info can be found here:
https://demo.postaffiliatepro.com/samples_tests/sale_tracking_docu.php
The generated JavaScript code will look like this (for two items):
<script id="pap_x2s6df8d" src="https://URL.postaffiliatepro.com/scripts/trackjs.js" type="text/javascript"> </script> <script type="text/javascript"> var sale1 = PostAffTracker.createSale(); sale1.setTotalCost('50'); sale1.setOrderID('1234_1'); sale1.setProductID('statue_12'); var sale2 = PostAffTracker.createSale(); sale2.setTotalCost('25'); sale2.setOrderID('1234_2'); sale2.setProductID('picture_200x135'); PostAffTracker.register(); </script>