in your sale tracking code you can use various parameters that wil pass additional data about the transaction.
setTotalCost() | |
total cost of the order. It is required for percentage commissions campaigns, otherwise optional |
setFixedCost() | |
fixed cost of the order. Fixed cost is substracted from totalcost before commission is computed. If you put % in front of the number, the fixed cost will be computed as percentage |
setOrderID() | |
ID of the order. Can be used for recognizing duplicate transactions |
setProductID() | |
ID of the product |
setAffiliateID() | |
ID or referral ID of the affiliate. With this parameter you can force to register commission to this affiliate |
setCampaignID() | |
ID of the campaign. With this parameter you can force to register commission using this campaign |
setChannelID() | |
ID of the channel. With this parameter you can force to register commission for this channel |
setCoupon() | |
Coupon code. If set, affiliate is recognized from coupon code |
setCustomCommission() | |
value of custom commissions. You can force to use this commissions value instead of commissions set in campaign. If you put % in front of the number, the commission will be computed as percentage |
setCurrency() | |
currency code. You can force to use this currency instead of default currency. (you need to have Multiple currencies feature enabled) |
setStatus() | |
force to set this status for this commission. You can use these states:
- 'A' - approved
- 'P' - pending
- 'D' - declined
|
setData1() | |
set custom data for this transaction. You have up to five fields. |
setData2() | |
set additional custom data for this transaction |
setData3() | |
set additional custom data for this transaction |
setData4() | |
set additional custom data for this transaction |
setData5() | |
set additional custom data for this transaction |
|
PostAffTracker.setCookieValue() | |
custom cookie value. With this parameter you can force to register commission with this cookie value.
The cookie value saves affiliate ID and campaign ID. It is in format {"c":"CAMPAIGNID","a":"AFFILIATEID","ch":"CHANNELID"}, for example {"c":"d3425s9f","a":"e2r48sv3","ch":null}. |
|
PostAffTracker.writeCookieToCustomField | |
this function writes the value of the cookie into input field with the specified ID |
PostAffTracker.writeAffiliateToCustomField() | |
this function writes the affiliate ID value from the cookie into input field with the specified ID |
PostAffTracker.register() | |
this function will call the affiliate system and saves the commission. This function MUST BE CALLED if you want to save the commissions. |