Integration of Celery e-commerce platform is achieved by direct insertion of our sale tracking code to a special section designed for affiliate tracking codes in your Celery admin panel.
Sale tracking code integration
Log in to your Celery dashboard and navigate to Settings> Checkout> Confirmation page> Custom scripts section and place this code there:
<script>
var order = App.getOrder({version: 'v1'});
var orderNumber = order.number;
var buyerEmail = order.buyer.email;
var total = order.total / 100;
</script>
<div id='papSaleTrackingPlaceholder'></div>
<script type="text/javascript">
(function(d,t) {
var script = d.createElement(t); script.id= 'pap_x2s6df8d'; script.async = true;
script.src = '//URL_TO_PostAffiliatePro/scripts/trackjs.js';
script.onload = script.onreadystatechange = function() {
var rs = this.readyState; if (rs && (rs != 'complete') && (rs != 'loaded')) return;
PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost(total);
sale.setOrderID(orderNumber);
sale.setData1(buyerEmail);
try { PostAffTracker.track(); } catch (e) {}
}
var placeholder = document.getElementById('papSaleTrackingPlaceholder');
placeholder.parentNode.insertBefore(script, placeholder);
placeholder.parentNode.removeChild(placeholder);
})(document, 'script');
</script>
Dont forget to save the changes with the Save button and you are done.
Do not forget to integrate your actual website with our click tracking code as well. Without click tracking, order tracking in Celery wont work properly. Click tracking code can be found in your Post Affiliate Pro merchant panel in Tools -> Integration -> Clicks tracking.