FastSpring

A cloud-based e-commerce, merchandising and fulfillment platform.

FastSpring provides a comprehensive e-commerce solution for companies that sell downloadable products and subscription-based services.

The integration works only if you use FastSpring's Store Builder Library. The point of the integration is to fill the tracking ID as papCookie order tag and set up a webhook to notify the tracking plugin.

You will be able to track per product commissions, product SKU, order ID, recurrence and customer details as well.

1.

Integrating your website and FastSpring Store Builder

The first step is to add the tracking ID as papCookie order tag into the Store Builder object. The exact way of doing this depends on the actual Store Builder implementation, here is an example of code which would read the tracking ID and pass it into papCookie order tag:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
  PostAffTracker.setAccountId('default1');
  try {
    PostAffTracker.track();
  } catch (err) { }
  PostAffTracker.executeOnResponceFinished.push(function() {
    var tags = {
      "papCookie": PostAffTracker._getAccountId() + PostAffTracker._cmanager.getVisitorIdOrSaleCookieValue()
    }
    fastspring.builder.push({'tags': tags});
  });
</script>

2.

Configuring FastSpring webhook

In your FastSpring admin panel add a new webhook for your Post Affiliate Pro. Navigate to Integrations -> Webhooks -> Add Webhook URL

For the URL use http://URL_TO_PostAffiliatePro/plugins/FastSpring/fastspring.php
For Events select order.completed and subscription.charge.completed

If you wish you can also set up the HMAC SHA256 Secret with an arbitrary pass phrase and you'll need to set up the same pass phrase in the next step in the plugin.

3.

Activate the plugin

The final step is to activate the FastSpring plugin (you set the webhook for) in your Post Affiliate Pro merchant panel under Configuration->Plugins section.
That's it. All transactions will now be tracked.


Do not forget to integrate the click tracking code to your website as well.