Language switcher

–Hidden comment

Use attributes in format region_from and region_to= to change the languages showing in language switcher.
Available regions are:
europe_from europe_to
asia_from asia_to
mideast_from mideast_to
america_from america_to

europe_from=0 europe_to=22 will put all languages (ordered in language switcher settings) from 1 to 21 to Europe region:
asia_from=22 asia_to=25 will put all languages from 23 to 24 (so only 2) into Asia region.


Build your store or website with a risk free trial, no credit card needed.

Shopping Carts from Shift4Shop are complete e-commerce storefront solutions for your new or existing web site. Easily build, edit, and maintain your online shop and collect orders without any programming or HTML knowledge!
This integration integrates template for Shift4Shop’s thank you page.

NOTE: Your installation of Post Affiliate Pro must be available via HTTPS:// because the checkout happens in a secured page.

Add sale tracking code

Go to Settings > Design > Themes & Styles > Under More button choose Edit Template (HTML) and edit file “checkout-step4.html” to add following code to the very end:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
var sale = PostAffTracker.createSale();

var discount='[discounts]';
var splitDiscount = discount.split("$");
var numberDiscount = splitDiscount[1];

var total='[osubtotal]';
var splitTotal = total.split("$");
var numberTotal = splitTotal[1];
var TotalLessDiscount = numberTotal - numberDiscount;



If you need to add more information in sale tracking code, please refer to this guide on Shift4Shop:

To utilize the Coupons feature add right under:


the following:


Product ID matching

If you want to track per product commissions, you have to use this integration code instead of the above one. The instructions are almost the same – edit the same file “checkout-step4.html” and add this code to the first line of the file:

<!-- PAP Integration snippet - part1 -->
<input type="hidden" id="itemNums" value="0">

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>

<!-- checking if any discount (not gift certificate!) has been applied -->
<script type="text/javascript">
	var papItems = [];
	var discount = '[discounts]';
	var splitDiscount = discount.split('$');
	if (splitDiscount[1]>0) {
		var numberDiscount = splitDiscount[1];
<!-- /PAP Integration snippet - part1 -->

Now find this line:

<!--START: items-->

and add this code below it:

<!-- PAP Integration snippet - part2 -->
	<script type="text/javascript">
	var i = document.getElementById('itemNums').value;
	var iIncremented = ++i;

	var subTotal = '[subtotal]';
	var splitSubTotal = subTotal.split('$');
	subTotal = splitSubTotal[1];

	papItems[i-1] = {"subTotal":subTotal, "id":'[id]', "orderId":"[invoice-prefix][invoice-number]("+iIncremented+")"};
<!-- /PAP Integration snippet - part2 -->

The last part of the code goes to the very end of the same file:

<!-- PAP Integration snippet - part3 -->
<script type="text/javascript">
	var discountPerItem = 0;
	if (typeof numberDiscount != 'undefined') {
		discountPerItem = numberDiscount / document.getElementById('itemNums').value;

	papItems.forEach(function (item, index) {
		var sale = PostAffTracker.createSale();
		sale.setTotalCost(item.subTotal - discountPerItem);
<!-- /PAP Integration snippet - part3 -->

The application will use product IDs defined in your Shift4Shop so you can easily check each product ID in Products > View.

Lifetime commissions

Tip: If you wish to utilize Lifetime Commissions, then in the “checkout-step4.html” file find the following line:

<td class="item">[oemail]</td>

and right below that line add this code:

<!-- Post Affiliate Pro integration snippet -->
<script type="text/javascript">
var customerEmail = '[oemail]';
<!-- Post Affiliate Pro integration snippet -->

The last step is to add this line into the sale tracking code:

Back to Integrations Create account for FREE

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.


Schedule a one-on-one call and discover how Post Affiliate Pro can benefit your business.

We’re available on multiple dates

Schedule a call