–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.


SamCart integration allows you to track the regular (one time) orders and also recurring payments. The integration consists of adding a tracking code to each product advanced settings and creating a webhook which will notify a plugin in your Post Affiliate Pro.

To track recurring payments you need to use the Recurring Commissions feature!

Create a custom field

The first step in this integration is to create a custom field which will be used for carrying the tracking cookie. If you need more info about how to achieve this, see the SamCart documentation about custom fields.

When creating it, make sure to set the Internal Field Name to “papCookie” and set Field Type to Text Input. Everything else may remain default.

When your custom field is created save the ‘Slug’ value as you will need it in the next step. Now add the custom field to all of the products that you want to track by Post Affiliate Pro. 

Add tracking code

The next step would be to add the sale tracking code. Navigate to your SamCart Settings. Find General Settings and paste the following code into the Embed HTML/Scripts field:

<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 sludId = 'XXXXXXXX';
document.getElementById(sludId).parentNode.parentNode.style.display = 'none';
try {
    }, 1000);
} catch (err) { }

Make sure to replace the value XXXXXXXX with your custom slug of your custom field.

Create the integration

Still under SamCart Settings go to the Integrations menu and under the Integration Setup tab click the New Integration button. From the dropdown select the Notify URL integration, on the next window name it as you like and insert the following Notify URL.

Make sure to replace the SHOPNAME.samcart.com with the actual URL of your SamCart shop:


Create the rules

Under SamCart Settings > Integrations switch to Global Rules tab and create 2 new rules for triggers Product Purchased and Subscription Charged, in both rules make sure to select the integration you’ve created and the action to Send Notify Url POST.

If you wish to track also refunds and automatically refund the commissions add also a rule for triggers Product Refunded and Subscription Charge Refunded and don’t forget to enable the refund tracking in the plugin configuration in the next step.

Activate the SamCart plugin in PAP

Log in to your Post Affiliate Pro merchant panel and navigate to Configuration > Plugins section and activate the SamCart webhook handling plugin. Once the plugin is activated make sure to configure it, mainly enter your Shop URL as the same value which you’ve added in the previous step.

Add the custom field to products

The last step is to add the custom field you’ve created in previous step to all the products which should be tracked by Post Affiliate Pro. To do this, in your SamCart dashboard navigate to Products and edit each product.

In the product edit view go to the Checkout Design section and scroll down to EDIT YOUR PAGE section and click on the Launch Drag & Drop Builder button. On the next screen go to the Settings > Checkout Form and under Custom Fields section check the checkbox next to the papCookie custom field and save the product by clicking the Publish button at the top of the page.

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