Lifetime commissions

This plugin enables lifetime referral tracking based on unique customer identifier (for example his email) passed in one of the custom data field parameters (data1 to data5) of your sale/lead tracking code. In all our integration methods which support Lifetime Commissions tracking we save the unique customer identifier to Data1 field.

If you want to know whether your integration method has support for this plugin, then you can edit already saved commission in your merchant panel Transactions->Commissions and have a look whether there is some unique customer identifier saved in any of the Extra Data fields. Usually we save customer emails. OR you can find your ecommerce system in the available integration methods and at the description of the method it should be stated whether it supports Lifetime Commissions.

How it works

  1. If a customer is referred by an affiliate for the first time, the plugin will store the relation between the customer (his/her identifier) and the affiliate into the database.
  2. Next time, when the same customer (with the same identifier) makes a sale/lead, the system will find the affiliate who originally referred him, and give commission to that affiliate. This affiliate will receive commission for sales/leads made by this customer until the relation between this customer and affiliate is manually removed from the database or until Lifetime Commissions plugin is completely disabled.

Removing relation between customer and affiliate

Easiest way to manage customer-affiliate relations is using our feature called Lifetime referrals manager. This feature allows you to add, edit or delete these relations directly from your merchant panel.

If you can't or don't want to use this feature for any reason you can also break the relation directly in the database of your Post Affiliate Pro installation (customers using our hosted accounts don't have direct access to the database therefore this option is only available for standalone license owners). Find the table qu_pap_lifetime_referrals this table contains relations between affiliate ID saved in column userid and unique identifier saved in column identifier. You can change these records or delete the row representing the relation between the affiliate and the customer completely.

Plugin configuration



  • If the check box "Load by lifetime referrer also campaign and banner" is checked, then all the subsequent sales of the particular customer that result in a commission will match the same campaign and banner as the initial transaction when the lifetime referral relationship was created.
  • Same goes for the 'channel' information if you check in the "Load by lifetime referrer also channel" option.
  • Use lifetime referrer only for unreferred sales option means that lifetime referral tracking will be used only if the sale is tracked as unreferred. If subsequent sales/leads of the same customer are referred by some other affiliate, commission will be assigned to this affiliate instead of using affiliate defined in lifetime commissions plugin.
  • Use lifetime referrer for new signed up affiliate this option will enable recognizing parent affiliate during affiliate signup process based on lifetime referrer relations. So if some lifetime relation between the person that is signing up to your affiliate program and already registered affiliate already exist, the new affiliate will be signed up as sub-affiliate of the affiliate that referred him.
  • In the "Check lifetime referral expiration" section you decide what should happen if during commission saving a lifetime referral is found and the lifetime referral is older than the time you have defined in the 'Limit cookie lifetime to' setting of the recognized campaign. Remember that the campaign can be recognized also from the lifetime referral if "Load by lifetime referrer also campaign and banner" is enabled. There are 3 options to choose from:
    • No -> the commission is normally saved to the affiliate associated with the customer by the lifetime relation.
    • Yes, do not save expired commissions ->  the commission isn't saved since the lifetime referral is already older than the cookie lifetime defined in the campaign.
    • Yes, save expired commission as unreferred (if set in tracking settings) -> the commission is saved to the default affiliate set in Configuration -> Tracking settings -> Save unreferred sales/leads instead of to the lifetime referral affiliate.
  • Transaction data field defines the commission extra data field into which your sale tracking integration is sending the unique identifier which will be used by this plugin. Most of our integration methods send the unique identifier to Data 1 field.
  • Transaction note for affiliates holds the note which should be added to "Merchant note" field of your commissions where the affiliates can see them. The note is added for every commission which is saved to lifetime referral.
  • Tie new affiliate with option allows you to create a lifetime relation for every newly created affiliate. The next setting "For lifetime identifier use" defines which affiliate field is used as the unique lifetime identifier for these relations. There are 3 options for with whom the relation should be created:
    • No one - there will be no lifetime relation created for the newly signed up affiliate.
    • Parent affiliate - the newly created affiliate will have a lifetime relation created with his parent. Every new commission which will come in with the Transaction data field containing the string which the new affiliate had filled in in the field defined in For lifetime identifier use field will be saved under the parent of this affiliate. Useful for example if your affiliates are also your customers and you want to ensure that every affiliate order will go to his parent.
    • Himself - Similar to the above option but the relation will be created with the new affiliate himself. Useful if all of the affiliate's orders should be associated with him. You can combine this with the Prohibit Commission If Affiliate Is Purchaser plugin to further extend the options.
  • In For lifetime identifier use field you should select the field in which the unique identifier is filled in during affiliate signup. It is used only with the above "Tie new affiliate with" function.

Additional options

Lifetime Commissions plugin also adds additional options to configuration of each commission type under campaigns / commission groups.

  • Lifetime referral commission field allows to set a value of custom commission which will be assigned to commissions saved by lifetime referrals - if the transaction is tracked and associated with an affiliate based on previously stored lifetime relation, then that affiliate would get the commission that is set in this field instead of the commission defined above.
    This field supports both percentage and fixed commission types. For example %20 (the % must be before the number) or 20 for fixed commission. To define commissions on multiple tiers you need to separate the tiers by semicolon ";", so for example to have 20% for 1st tier, 10% for 2nd tier and $1 for 3rd tier you'd set this field to %20;%10;1
  • Lifetime referral commission validity field accepts a number representing how many days after the creation of the lifetime referral relation should the below Lifetime referral commission after validity field apply instead of regular commission or the custom one from Lifetime referral commission. If this field is left empty the Lifetime referral commission after validity field will never be used.
  • Lifetime referral commission after validity follows the same rules as Lifetime referral commission but is used only if lifetime referral relation is older than the number of days defined in Lifetime referral commission validity

Code examples

Sale tracking code example:

<script type="text/javascript">
document.write(decodeURI("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_YOUR_POSTAFFILIATEPRO/pap/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E"));
</script> <script type="text/javascript">
var sale = PostAffTracker.createSale();
sale.setProductID('test product');


Action commission tracking example:

<script type="text/javascript">
document.write(decodeURI("%3Cscript id=%27pap_x2s6df8d%27 src=%27" + (("https:" == document.location.protocol) ? "https://" : "http://") + "URL_TO_YOUR_POSTAFFILIATEPRO/pap/scripts/trackjs.js%27 type=%27text/javascript%27%3E%3C/script%3E"));
</script> <script type="text/javascript">
var action = PostAffTracker.createAction('actioncode');
action.setProductID('test product');