Weebly integration
A web-hosting service featuring a drag-and-drop website builder.
Weebly is a unique site builder, helping you create your own site or a blog. Easy to use drag-and-drop functions speed the creation up.
The tracking happens by a hidden image (pixel) that is loaded in the the receipt page once the customer is automatically redirected to the receipt page after successful order.
Integration
After you log in to Weebly navigate to Settings >General and scroll down to the Tracking section which you need to edit and insert the following code to the Custom Tracking – Receipt Page section:
<!-- Post Affiliate Pro integration snippet -->
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
var papItems = {items};
var papProductNames = '';
var item = 0;
while (typeof papItems[item] != 'undefined') {
papProductNames += papItems[item].name + ', ';
item++;
}
var sale = PostAffTracker.createSale();
sale.setTotalCost('{subtotal}');
sale.setOrderID('{txid}');
sale.setProductID(papProductNames.slice(0, -2));
sale.setData1('{email}');
PostAffTracker.register();
</script>
<!-- /Post Affiliate Pro integration snippet -->
NOTE: Your installation of Post Affiliate Pro (Network) must be available secure connection (HTTPS://) since the receipt page of Weebly is also available only via HTTPS://
Save and publish your changes.
Integration – per product tracking
If you’d like to give different commission for different products you’d use the following code instead of the one above:
<!-- Post Affiliate Pro integration snippet -->
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
var item = 0;
while (typeof papItems[item] != 'undefined') {
var sale = PostAffTracker.createSale();
sale.setTotalCost(papItems[item].total_price);
sale.setOrderID('{txid}(' + item + ')');
sale.setProductID(papItems[item].name);
sale.setData1('{email}');
PostAffTracker.register();
item++;
}
</script>
<!-- /Post Affiliate Pro integration snippet -->
Do not forget to integrate your site with the click tracking code. Get the code from Tools->Integration->Clicks tracking section of your Post Affiliate Pro (Network) merchant panel and then place it in Weebly under Website > Overview > Edit > Settings > SEO > Footer Code section.