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


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.

Now login to your Miva admin panel and navigate to Home> User Interface> Settings> Global Header & Footer (or simply use the search bar to search for 'global footer') and place the code into the textarea for Global Footer.

Now click Update button.


Add sale tracking code

Login to your Miva admin panel and search for 'invc'. Choose the Edit Page: Invoice and find the Details section. Now, paste the sale tracking code to the textarea named Template, just below the body tag

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></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();
	<mvt:foreach iterator="item" array="order:items">	
		sales[counter] = PostAffTracker.createSale();	
		counter ++;

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 price, product code and order ID from your Miva store.
If you wanted to add customer email (for Lifetime Commission) you can use this variable: