DPD's copy-and-paste shopping cart and digital delivery system makes it easy to sell downloads, keycodes, and tangible goods through your website, blog, forum posts, Facebook, and more. Automatically generate unique, secure download URLs for every purchase and track customers and sales or run your own affiliate program.

The integration method uses DPD admin panel option to have your own tracking codes.

1.

Entering the sale tracking code

Log in to your DPD. In case you have multiple stores, select the store you want to add the integration code to using the store selector in the top right corner of the dashboard. Navigate to Integrations in the left menu to open the integration list. Find the 3rd party tracking code integration in the list and click '+ Add' button.
The configuration page that opens is the place where you can configure the integration. First, make sure the code is enabled, name is the way you want but keep it informal so it is easy for you to recognize which tracking code is for which application. Finally, the tracking code you have to use is this:

<script type="text/javascript">
	document.write(unescape("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E"));
</script>
<script type="text/javascript">
	
	var sale = PostAffTracker.createSale();
	sale.setTotalCost('{{ order.total_price - order.tax_price }}');
	sale.setOrderID('{{order.id}}');
	PostAffTracker.register();
</script>

Save the integration settings and you are done.

2.

Available variables

These are variables you can use, in case you want to extend your tracking code:

Order - Order variables are related to the customers order.  For example:

{{order.id}}
{{order.total_price}}
{{order.subtotal_price}}
{{order.tax_price}}
{{order.shipping_price}}
{{order.total_discount}}

Store - Variables related to the store.  For example:

{{store.name}}
{{store.contact_email}}

Customer - Variables related to the customer for this order.  For example:

{{customer.first_name}}
{{customer.last_name}}
{{customer.email}}

3.

Per product integration

If you want to track per product commission, please use the following sale tracking code instead:

<script type="text/javascript">
	document.write(unescape("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_PostAffiliatePro/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E"));
</script>
<script type="text/javascript">
	
	
	{% for item in order.items %}
	var sale{{ loop.index }} = PostAffTracker.createSale();
	sale{{ loop.index }}.setTotalCost('{{ item.line_price }}');
	sale{{ loop.index }}.setOrderID('{{ order.id }}_{{ loop.index }}');
	sale{{ loop.index }}.setProductID('{{ item.sku }}');
	{% endfor %}
	
	PostAffTracker.register();
</script>

Do not forget to integrate your cart with the click tracking code.