This plugin enables lifetime referral tracking based on a 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 that support Lifetime Commissions tracking we save the unique customer identifier to the 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 at 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.
Table of Contents
- How it works
- Lifetime referrals manager
- Plugin configuration
- Additional options for the commission settings
- Code examples
How it works
- If a customer is referred by an affiliate for the first time (customer makes the first purchase through an affiliate link), the plugin will store the (lifetime) relation between the customer (his/her unique identifier) and the affiliate into the Post Affiliate Pro.
- Next time, when the same customer (with the same identifier) makes a sale/lead (even without clicking on affiliate link/banner again or from a completely different device), the system will find the affiliate who originally referred him, and give commission to that affiliate. This affiliate will receive a commission for sales/leads made by this customer until the relation between this customer and affiliate is manually removed from the database (using 'Lifetime referrals manager' feature) or until Lifetime Commissions plugin is disabled.
Lifetime referrals manager - customize the relation between customer and affiliate
The easiest way to manage customer-affiliate relations is by using a 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 installations on your own servers). 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
- Load by lifetime referrer also campaign and banner - if this option is enabled, 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.
- Load by lifetime referrer also commission group - this option is displayed in plugin configuration only if the above "Load by lifetime referrer also campaign and banner" option is enabled. When you enable this option, the commission group within a campaign is also recognized based on the lifetime relation.
- Load by lifetime referrer also channel - same as in the above case is applied for the 'channel' information.
- Apply lifetime referrer only per specific campaigns - this setting is displayed on plugin's configuration ONLY when the "Load by lifetime referrer also campaign and banner" is DISABLED. This is because in this case the campaign cannot be recognized based on the lifetime relation of course. The campaign will be recognized in another way (cookie, forced parameter, product, etc.). When you enable this option, you can see a new option in every campaign's details called "Apply lifetime referrer tracking". If it is checked, lifetime referrer will be used in sale/action tracking for this campaign only. The lifetime relation will always be created on any sale, even if the "Apply lifetime referrer tracking" checkbox is not checked in campaign. It just won't be used to recognize affiliate in the campaign where the checkbox isn't checked.
- Use lifetime referrer only for unreferred sales - this option means that lifetime referral tracking will be used only if the sale is tracked as an unreferred, so no affiliate was recognized during sale/lead processing from features, cookies, IP address etc. If subsequent sales/leads of the same customer are referred by some other affiliate, the commission will be assigned to this affiliate instead of using affiliate defined in lifetime commissions plugin and also the existing lifetime relation will be overwritten to this new affiliate.
- Check lifetime referral expiration - section in which 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 4 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 or the commission group in which an affiliate is added.
- 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.
- Yes, recognize affiliate from other methods - the system will use the affiliate recognized from other methods (cookie, IP address etc.) for the new commission and overwrite the expired relation with a new one created for the newly recognized 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 the Data 1 field.
- Transaction note for affiliates - holds the note which should be added to the "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.
- Use lifetime referrer for new signed up affiliate - this option will enable recognizing parent affiliate during the 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 exists, the new affiliate will be signed up as a sub-affiliate of the affiliate that referred him. Lifetime relation is looked up by what the new affiliate entered into the field defined in For lifetime identifier use setting below.
- Tie new affiliate with - option which 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.
- For lifetime identifier use - in this 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" and "Use lifetime referrer for new signed up affiliate" functions.
- Separate lifetime referral per accounts - this option is visible only on Post Affiliate Network version of our software. It allows you to enable/disable of lifetime referral per network account. If this option is DISABLED, lifetime relation is used globally for the whole network, no matter for what network account a commission was generated. So, lifetime relation can be created based on the commission generated for account 'A', but affiliate would still get a commission for the customer's next purchase, even if this new commission would be generated for account 'B'.
If the option is ENABLED, there will be a separate lifetime relation created for every network account.
Additional options for the commission settings
Lifetime Commissions plugin also adds additional options to the 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
- if you are not using one of our integration methods which would track customer's unique identifier into one of the sale data fields, you can track for example customer's email this way:
Sale tracking code
<script id="pap_x2s6df8d" src="https://URL.postaffiliatepro.com/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('default1');
var sale = PostAffTracker.createSale();
sale.setTotalCost('120.50');
sale.setOrderID('ORD_12345XYZ');
sale.setProductID('test product');
sale.setData1('customer@email.com');
PostAffTracker.register();
</script>
Action commission tracking code
<script id="pap_x2s6df8d" src="https://URL.postaffiliatepro.com/scripts/trackjs.js" type="text/javascript"> </script>
<script type="text/javascript">
PostAffTracker.setAccountId('default1');
var action = PostAffTracker.createAction('action_code');
action.setOrderID('ORD_12345XYZ');
action.setData2('customer@email.com');
PostAffTracker.register();
</script>