Pixel tracking (HTML image)

If you don't want to (or you can't) use JavaScript tracking code, you can use hidden image (pixel) instead. Note that by using the hidden image the system cannot use functionality of HTML5 storage cookies, it will depend only on standard cookies and IP address.


The hidden image variant of the tracking code is:
<img
src="https://URL_TO_PostAffiliatePro/scripts/sale.php?TotalCost=120.50&OrderID=ORD_12345XYZ&ProductID=test+product"
width="1" height="1" border="0" />

The POSTBACK variant of the tracking code above is:

https://URL_TO_PostAffiliatePro/scripts/sale.php?TotalCost=120.50&OrderID=ORD_12345XYZ&ProductID=test+product&AffiliateID=IDofTheAffiliate

Note: for Post Affiliate Pro to track such PostBack the most important part is to send the ID of the affiliate back to PAP. So you would either use the AffiliateIDparameter or the visitorId. You can read about the difference lower in the break-down of actual parameters.

Basically all the other parameters are optional, examples:

- if you don't select a campaign/banner then the default campaign will be used

- if you don't specify an affiliate and you have tracking of unreferered sales enabled then the commission will be saved to default affiliate

- If you don't enter TotalCost and you have tracking of empty orders allowed then a commission will be created, if you don't have it enabled then it won't track.


Here are all parameters that you can use in the pixel tracking code:
AccountId, ActionCode, FixedCost, TotalCost, OrderID, ProductID, data1, data2, data3, data4, data5, AffiliateID, CampaignID, BannerID, chan, Commission, PStatus (status of created commission, not payout status), Coupon, Currency, visitorId, refe, CustomCommissionNextTiersFromCampaign, DoNotDeleteCookies and ip.

Note that basically all these parameters are optional (depending on the scenario and settings) and should be used only if you want to achieve something special.

AccountId - only required with Post Affiliate Network, represents the ID of the network account under which the commission should be saved. You can get it from Accounts->Accounts manager section. In Post Affiliate Pro account ID is always default1

ActionCode - the code of the Action Commission which you wish to save

FixedCost - 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. You might need to encode the percentage sign so for example if you would want the fixed cost to be 20% you would NOT put FixedCost=%20 into the code but instead would put FixedCost=%2520 ( %25 is representation of percentage sign ). More can be read here

TotalCost - total cost of the order. It is required for percentage commissions campaigns, otherwise optional

OrderID - ID of the order. Can be used for recognizing duplicate transactions by the Fraud protection module

ProductID - ID of the purchased product

data1 - set custom data for the transaction which is the visible in the commission's Extra data fields 1 to 5. You have up to five fields you can use to store additional data.

data2 - set additional custom data for this transaction

data3 - set additional custom data for this transaction

data4 - set additional custom data for this transaction

data5 - set additional custom data for this transaction

AffiliateID - ID or referral ID of the affiliate to whom you want to save the commissions. With this parameter you can force to register commission to this specific affiliate. If not used affiliate is recognized from cookies, IP address and user agent, lifetime relationcoupon used or from visitorId parameter explained further down.

CampaignID - ID of the campaign under which you want to save the commissions. With this parameter you can force to register commission under this particular campaign. More about campaign recognition during tracking can be found here

BannerID - ID of the banner. With this parameter you can force to register commission with the defined banner which would also apply the campaign to which the banner belongs. More info about campaign recognition here

chan - ID of the affiliate's channel. With this parameter you can force to register commission for that particular channel.

Commission - value of custom commission which you would want to save. It would ignore the commissions defined in the campaigns and would instead save a commission with the value defined in this parameter. Caution should be applied here since if a custom commission is defined no multi-tier commissions are computed. If you put % (or rather %25 since the percentage sign might need to be encoded) in front of the number, the commission will be computed as percentage)

CustomCommissionNextTiersFromCampaign - (set this to 'Y') when you use custom commission, you can enable custom tier commissions to be computed automatically based on campaign settings. Default value is 'N' which means no tier commissions are computed when custom commission is used

ChangedCommission - value by which the calculated commission will be increased or decreased. Can be used if for example your campaign is set up with a fixed commission which you wish to decrease when a coupon is used. You can use values like %-50, %50, -5, 5 to increase/decrease the commission and you can use semicolon ';' as separator for changing multiple tiers. For example %-50;%-20 would decrease the 1st tier commission by 50% and 2nd tier commission by 20%. You might need to use %25 instead of just % to correctly encode the percentage sign in URL. This is not compatible with performance rewards and automatically re-computing of commission after user is changed to another commission group.

PStatus - status of the created commission (not payout status). You can use this parameter to force status for the commission. You can use these states:

  • 'A' - approved
  • 'P' - pending
  • 'D' - declined

Coupon - code of an affiliate's coupon. If set, affiliate is recognized from coupon code. Since version 5.9.8.8 this attribute accepts a comma separated list of coupons. The first one existing in the software will be used.

Currency - define currency code here if you are using Multiple Currencies feature. You can force this currency instead of system default currency.

visitorId - value of the customer's PAPVisitorId cookie. With this parameter you can force to register commission with this cookie value. The cookie value stands for visitor ID which is stored in Post Affiliate Pro database representing the relation between visitor and the referring affiliate. This relation stores also information about the click, campaign, banner.
visitorId must be just the visitorId, so a 32 characters long string without the account ID. Sometimes, for example using the writeCookie functions of the click tracking code you can get 40 characters long string where the first 8 characters is the account ID and the last 32 is the visitorId.

DoNotDeleteCookies - do not delete cookies after sale although 'Delete cookie after lead / sale' option is enabled, this needs to be used when you use tracking per product

ip - ip of visitor xxx.xxx.xxx.xxx, it is useful if you are calling this postback inside from server. Without ip parameter is displayed sale IP as IP of your server.

refe - Referrer URL of the visitor for which the sale tracking was executed. Useful mainly in server to server tracking using postbacks if your server stores the URL of the visitor for which the postback is executed or if you want to force the referrer URL for any reason.

×