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


Chargify is an online billing software for all of your recurring billing needs.

Integration with Chargify is achieved by placing a sale tracking script into the thank you page using a simple JavaScript logic.

First step

The first step would be to find the needed section where you can place the click tracking and sale tracking code. In your Chargify account navigate to Config > Settings > Public Page Default Settings and find the section called Custom JavaScript.

Sale tracking

Put the following code into the section described in the previous step:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
try {
} catch (err) { }

if (document.getElementById('analytics-signup-payment-id') != null) {
var sale = PostAffTracker.createSale();


Custom thank you page

If you have defined a custom thank you page in your product or public signup page then you will also need to integrate the custom thank you page.

First thing though is to edit your Products and Public Signup Pages under Catalog menu in your Chargify account and see whether you have Return URL after successful signup or account update defined. If you do have it set then add the following into the Return Parameters field:


Once you have that set you will need to edit the content of your custom thank you page and add this script to it:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
  var urlParams;
  (window.onpopstate = function () {
    var match,
        pl     = /\+/g,  // Regex for replacing addition symbol with a space
        search = /([^&=]+)=?([^&]*)/g,
        decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
        query  = window.location.search.substring(1);

    urlParams = {};
    while (match = search.exec(query))
       urlParams[decode(match[1])] = decode(match[2]);
  if (urlParams['orderid'] != '') {
    var sale = PostAffTracker.createSale();


Chargify gives us an option to use webhooks which we can use to track recurring commissions. To setup a webhook, first enable the Chargify plugin in your merchant panel. Then navigate to your Chargify account into Settings> Webhooks and click Add New Endpoint button where you can add your plugin’s URL:


and choose these endpoints: Payment Success, Refund Success.
Save it
and you are done.

NOTE: The endpoint has to use a valid SSL certificate, so only HTTPS connection is allowed.

It is now integrated. Every time a customer enters the order confirmation page, the tracking code is called, and it will register a sale for referring affiliate.

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