Campaign matching algorithm

In case you use multiple campaigns in your Post Affiliate Pro (PAP), then it is highly recommended to understand how a campaign is recognized during various actions like saving of a click or saving of a commission. This is important mainly because you can have your campaigns set with different commission settings and if you don't set up your program correctly with full understanding how campaigns are selected during tracking you will most likely get unwanted results which might be hard to rectify later.
 

Golden rule - use multiple campaigns only if you want to have different commissions for different products. If you want to have different commissions for different affiliates instead use Commission Groups.
 
Here are lists of methods/criteria for campaign selection, sorted by priority, which are checked during saving of a click/commission.
 
During saving of a click software looks for:
  1. Forced parameter - campaign will be recognized from forced parameter "CampaignID" that can be explicitly defined in the click tracking code.
  2. Standard parameter - campaign will be recognized from default campaign URL parameter (by default from the a_cid parameter of an affiliate link/banner).
  3. Banner - campaign will be recognized from banner URL parameter (by default from the a_bid parameter of an affiliate link/banner).
  4. Default campaign - if the previous methods fail the campaign marked as default is selected.
 
During saving of a sale/action commission software looks for:
  1. Lifetime Commissions plugin - campaign will be recognized from the lifetime referral relation set by Lifetime Commission plugin if it is enabled in the plugin.
  2. Coupon code - campaign will be recognized based on the coupon code which was used during purchase.
  3. Banner ID - campaign will be recognized from banner defined explicitly in the sale tracking code in BannerID parameter.
  4. Campaign ID - campaign will be recognized based on the campaign id defined explicitly in the sale tracking code.
  5. Product ID - campaign will be recognized based on productID parameter sent to PAP by the affiliate tracking code and defined in some campaign. If the same ID is found in multiple campaigns the system looks for the product ID first in private campaigns, then in public with manual approval campaigns and only then in regular public campaigns. If the same ID is found in multiple campaigns of the same type  (private, manual approval, public) then the campaign is selected randomly.
  6. Visitor Affiliate cookie - campaign will be recognized based on the visitorId cookie created by the click request previously. Based on "Overwrite cookies" setting in Configuration->Cookies it would recognize the campaign either from last click the visitor/customer has made or from the first click.
  7. Default campaign - if the previous methods fail the campaign which is marked as default is selected.

 

Note - you might have changed a_bid and a_cid URL parameter names can be changed in merchant panel Configuration->URL parameter names section.