Language switcher

#languages]

–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

Example:
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.

Integrations

Maximize the value of your existing affiliate marketing software and extend its possibilities with a wide range of integrations, plugins and apps. All built to improve the strong foundations of Post Affiliate Pro.

PayWhirl

PayWhirl makes it easy to manage recurring payments.

Integration with PayWhirl is done by using a PayWhirl’s built-in App called “Custom Tracking Scripts”.

Install the app

To start with the integration, navigate to your PayWhirl account and then to Apps & Integrations. Find and install an app called Custom Tracking Scripts.

Once installed you will see two different tabs on the settings page. One section will load scripts on EVERY page PayWhirl provides and the other section will only load scripts AFTER CONVERSIONS, when people complete checkout successfully – this is what we will use.

Sale tracking

The first step is to give your app a name. You can name it e.g. Post Affiliate Pro

Now, choose the ‘Conversion‘ tab and use the following code in it:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
    PostAffTracker.setAccountId('Account_ID');
    {% for invoice in invoices %}
        papSkus = '';
        {% for item in invoice.items %}
            papSkus += '{{item.sku}}, ';
        {% endfor %}

    var sale{{ loop.index }} = PostAffTracker.createSale();
    if ({{invoice.paid}}) {
        sale{{ loop.index }}.setTotalCost({{ invoice.amount_due }} - {{ invoice.shipping_total }} - {{ invoice.tax_total }});
    } else {
        sale{{ loop.index }}.setTotalCost(0);
    }
        {% if invoice.subscription_id %}
    sale{{ loop.index }}.setOrderID('{{ invoice.subscription_id }}');
        {% else %}
    sale{{ loop.index }}.setOrderID('{{ invoice.id }}');
        {% endif %}
    sale{{ loop.index }}.setProductID(papSkus.slice(0, -2));
    sale{{ loop.index }}.setData1('{{ customer.email }}');
    sale{{ loop.index }}.setCurrency('{{ invoice.currency }}');
    sale{{ loop.index }}.setCoupon('{{ invoice.promo_code }}');
        {% if loop.index != invoices|length %}
    sale{{ loop.index }}.doNotDeleteCookies();
        {% endif %}
    {% endfor %}

    PostAffTracker.register();
</script>

If you scroll down a little you will see a full list of available variables, so if you was to customize the sale tracking code, feel free to do so using the available variables.

Webhook setup

To track also recurring payments you’ll need to set up a webhook under Developer > Webhooks where you need to create a webhook for account event charge.succeeded. If you are looking to track refunds as well then create the webhook for charge.refunded as well.

The webhook must be created for the following URL:

https://URL_TO_PostAffiliatePro/plugins/PayWhirl/paywhirl.php

The recurring commissions will only track if you use the Recurring Commissions feature or the Lifetime Commissions plugin.

Plugin activation

The last step of the integration is to activate the tracking plugin in your Post Affiliate Pro account. Log in to your merchant panel and go to Configuration > Plugins where you need to find and activate the PayWhirl webhook handling plugin. Once the plugin is activated you can configure it to enable/disable refunds tracking and to set what details should be saved into the extra data fields of the commission.

Do not forget to integrate your site with the click 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