Action Commissions

The Action Commissions feature allows you to define different CPA (cost per action) commissions. So for example a lead can be tracked as a 'lead' and not a 'sale' type of commission.
This way you can define a specific commission for user registrations, downloads, visiting specific pages, etc. 

You can create an unlimited number of action commissions in each campaign, which gives you the ability to track virtually every visitor's move as long as you can integrate the pages (in which the particular action is successfully accomplished) with a small JavaScript snippet or hidden image (pixel).

Activating the feature

First you need to activate the feature from your merchant panel under -> Configuration -> Features
Click on Activate next to the Action Commissions feature.
Now you can add new per action commission types in your campaigns.


Setting up per action commissions

Once the feature is activated, go to the Campaign manager and edit any campaign. Go to the  Commissions settings tab and you'll see a new button Add per action commission.

Clicking on this button a new window will open up where you can define your new Action Commission.

Code of action commission should be a string without spaces and special characters that you'll later use in the tracking script to specify that this action should be used. The code has to be unique within one campaign, so you cannot have actions with the same code in one campaign.
Action name should be a normal readable name of the action, you'll see the commissions with this type in your reports
For the new action you have to define also the Commissions value and type (fixed or percentage) and possible multi-tier commissions.

Now we have created a new per Registration action commission that should be fired when a user registers to your site. (*just an example)

Note! After creation, the new commission type is enabled in the commission settings tab. 


Registering per action commissions

Now that the new per action commission is created, we can set up the tracking of the new action. To do that, we have to insert the JavaScript tracking code to the page that should trigger the action. In our case (per Registration example) it should be a page that is displayed after the user registers.

The standard (sale) tracking code looks like this:
<script id="pap_x2s6df8d" src="" type="text/javascript">
<script type="text/javascript">
var sale = PostAffTracker.createSale();

Note - that is NOT the code you should use. It would create a standard per sale commission. 

To track per action commissions, we have to use the  createAction('actionCode')  function instead of createSale() function, where the actionCode is the code we defined for our new action commission when configuring it in the merchant panel.

So the complete script for tracking our per registration action is:

<script id="pap_x2s6df8d" src="http://URL_TO_PostAffiliatePro/scripts/salejs.php" type="text/javascript"> </script>
<script type="text/javascript">
var action = PostAffTracker.createAction('registration'); 

Now whenever the page with that JavaScript code is displayed, it will create a new per registration commission for the referring affiliate.
NOTE: The OrderID is not essential in case of an action(lead).

You can even generate this action tracking code directly in your merchant panel under Tools > Integration > Sale/lead tracking > from the drop-down menu choose "General solution" > click "show advanced tracking options" and there will be a 'Action code' drop-down box from which you can choose an existing action code.

You can also use the action code in the Hidden Image integration code:
<img src="http://URL_TO_PostAffiliatePro/scripts/sale.php?AccountId=default1&ActionCode=registration&OrderID=ORD_12345XYZ" width="1" height="1" >
(If you use plus sign '+' in action code, it have to be replaced with '%2B', only in Hidden Image tracking.)
The 'OrderID'  is not essential

NOTE: if there is no Total Cost in the lead tracking code, then you must turn on the following options in the settings of the action commission:

"Save transaction also for zero orders (Total Cost = 0)"

"Save transaction with zero commission"