Miva 5 integration method. This integration method includes click and sale tracing.

1.

Add click tracking code

Login to your PAP merchant panel. In the menu navigate to Tools->Integration. Click on Click tracking icon. Copy your click tracking code from window that opened. Code is located just bellow Copy & paste this JavaScript code to your page sign.

Now login to your Miva5 admin panel. Go Left menu->Pages. Now click edit on INVC Invoice page. 

Now pick Global Header & Footer* from top menu. Now add code, you copy from your merchant panel, to the same end of textarea named **Global Footer.
** Now click Update button.

2.

Add sale tracking code

Login to your Miva5 admin panel. In the left menu navigate to Pages section and edit the INVC Invoice page.

Now, paste the sale tracking code to the textarea named Template, just below this line:
<mvt:item name="body">

<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">
	function stringFilter (s) {	
		filteredValues = "1234567890.,";     	
		var i;
		var returnString = "";	
		for (i = 0; i < s.length; i  ) {
			var c = s.charAt(i);	
			if (filteredValues.indexOf(c) != -1) {	
				returnString = ""   returnString   ""   c;	
			}
		}
		return returnString;
	}
	var counter = 0;	
	var sales = new Array();
	PostAffTracker.setAccountId('default1');
	<mvt:foreach iterator="item" array="order:items">	
		sales[counter] = PostAffTracker.createSale();	
		sales[counter].setTotalCost(stringFilter('&mvt:item:formatted_subtotal;'));	
		sales[counter].setOrderID('&mvt:order:id;');	
		sales[counter].setProductID('&mvt:item:code;');	
		counter   ;	
	</mvt:foreach>
	PostAffTracker.register();	
</script>

That's it. Now you can track your sales. 

Note: Every product is tracked as a single transaction. For every product in customer's basket we record its priceproduct code and order ID from your Miva5 store. 
If you wanted to add any additional fields, please read this __Miva5 template technical documentation.