Post Affiliate Pro

Want to track your SamCart orders in Post Affiliate Pro? We've got you covered.

SamCart and Post Affiliate Pro (PAP) have teamed up to build an integration that allows you to track SamCart orders inside of Post Affiliate Pro. 

Follow the steps below to get integrated!

Step #1: Create a Custom Field for Post Affiliate Pro

In order for Post Affiliate Pro to track your SamCart orders, we need to get Post Affiliate Pro's tracking cookie onto your SamCart Product pages. The first step in doing so is creating a Custom Field

If you're not familiar with how to go about creating Custom Fields inside of SamCart, then head over to this Knowledge Base article. It'll take you through the steps of building one!

Important: For this specific Custom Field, set the Internal Field Name (1) to "papCookie

Set Checkout Page Label (2) to anything you'd like. 

Set Field Type (3) to Text Input

Make sure Required? and Show In Receipt? are unchecked and click Save (4).

Once the Custom Field is created, add it to all of the Products that you'd like to be tracked by Post Affiliate Pro. 

Step #2: Add Post Affiliate Pro Tracking Code to SamCart

Now that our Custom Field is created, we need to inject Post Affiliate Pro's tracking cookie onto your SamCart Product pages. To do this, head into your SamCart Dashboard and click into your Settings. In your General Settings, paste the following code into the Embed HTML/Scripts field:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/:.js" type="text/javascript"></script><script type="text/javascript">document.getElementById('CUSTOM_SLUG') = "none";PostAffTracker.setAccountId('Account_ID');try {PostAffTracker.track();setTimeout(function(){PostAffTracker.writeCookieToCustomField('CUSTOM_SLUG');},1000);} catch (err) { }</script>

Important: After you've pasted in the code, replace CUSTOM_SLUG with the Slug from the Custom Field you created in Step #1. 

Step #3: Create a Notify URL Integration for Post Affiliate Pro

In SamCart, head to Settings > Integrations and click the New Integration button. From the dropdown menu, choose Notify URL (1) and click Next Step (2):

On the following screen, name the integration anything you'd like. Under Notify URL (1), paste in the following URL:


Important: Replace "SHOPNAME" with your SamCart Marketplace name. In the example below, the Marketplace name is "," so "cscheben" is entered.

After the Notify URL is pasted in and "SHOPNAME" is replaced, click Save Integration (2):

On the same screen, click the Global Rules tab followed by New Rule (2): 

First, you’ll need to decide what action you want to perform on your integration. An action is the functionality available in an Integration you are connected to. In the Integration-specific dropdown, select your connected Integration you'd like to set up a rule for. Then select the Integration specific Action.

Once you have your Integration and Action selected, click on Next Step.

Next, you’ll need to select a trigger. A trigger is the event inside of your SamCart Marketplace that tells the Integration Engine it’s time to make something happen in a connected application. 

In the first dropdown on the second step, you will want to select either eCommerce or Courses. eCommerce rules will apply to actions on your product pages, while Courses triggers will be anything related to the Courses app. The available triggers in the dropdown will be specific to the selected integration. In this example, we’ll use the Product Purchased trigger as it’s the most common. 

Select Product Purchased from the drop-down menu and click Next Step:

And that's it! Click Submit and SamCart will send an HTTP POST to your Notify URL each time your Product is purchased.

Important: Remember to complete this process for both Product Purchased and Subscription Charged.

NOTE: Each application has different Actions available. The following are available on Post Affiliate Pro
Available Integration Triggers

  • Product Purchased
  • Product Refunded
  • Product Added to Order
  • Subscription Canceled
  • Subscription Delinquent
  • Subscription Recovered
  • Subscription Restarted
  • Subscription Charged
  • Subscription Charge Failed
  • Order Completed
  • Upsell Purchased
  • Subscription Completed

Step #4: Activate the SamCart plugin in Post Affiliate Pro

Log in to your Post Affiliate Pro merchant panel and navigate to Configuration (1) followed by Plugins (2): 

Here, search for SamCart under Plugins and, after SamCart webhook handling appears, hit Activate:

Make sure to match your Shop URL with your SamCart Marketplace URL (

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.