The Simple Way To Sell Online.
SamCart integration allows you to track the regular one time orders and also recurring payments. The integration consists of adding a tracking code to checkout pages, adding a custom field to the products which should be tracked 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!
Log in to your SamCart dashboard and go to Settings by clicking in the upper right corner, then navigate to Custom Fields on the left side menu and click the Create New button.
Set the Internal Field Name to papCookie, add a label and set the field type to Text Input. The field should not be required and shouldn't display on receipt page.
Once the field is created copy its Slug value for the next step.
Still under your SamCart Settings go to the General menu and insert the following code into the Embed HTML/Scripts textarea.
Make sure to replace the
CUSTOM_SLUG with the actual Slug value of the field you've created.
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.
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 trigger Product Refunded and don't forget to enable the refund tracking in the plugin configuration in the next step.
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.
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 navigate in your SamCart dashboard to Products and edit each product. In the product edit view go to Checkout Design scroll down to the Custom Fields section and check the checkbox next to the papCookie custom field and save the product.