Integration description for Advertisers
General procedure
On our platform, two sides parties meet. On one side it is casinos, sportsbooks and lotteries (Advertisers) and Affiliate Partners on the other.
The beginning of cooperation for the Advertiser looks like this from a technical point of view:
- The client sends us banners with various graphics and dimensions.
- We will create a unique campaign for each partner that represents their casino in the system and offer this campaign to our affiliates to advertise on the platform.
- In the campaign, we will set the terms and conditions for the affiliate partners according to the contract with the Advertiser, including player lifespan, CPA rewards, progressive commissions etc.
- Each banner will get its own unique link which will carry the campaign and affiliate partner details. For example: https://go.affilmaster.com/scripts/cdvy4d2?a_aid={refid}&a_bid={bannerid}. This link then goes directly to the partner. For example: https://www.casino.com/?a_aid=IDAffiliate&a_bid=bannerID.
- When a player clicks on this banner, he is redirected to your casino and carries with him a unique “visitorId” value that defines his relationship with the affiliate partner and campaign within his cookies. Once this value is saved to your database, we recommend removing it from the resulting URL (using JS, …) to prevent the unique value from being copied when a player shares the URL address with another player.
- The player registers at the casino and makes a deposit. He loses an amount. (We have to get this by S2S call from you from the system).
- Send us the aforementioned data for the current player specifically to our endpoint and we will log it into the system for the corresponding affiliate and campaign.
In order to achieve the above, your casino must send certain information about transactions and registered players:
- customer ID (unique ID assigned by your system) that was tracked in the system after a successful registration (customerID).
- the amount or value of the monitored transaction (TotalCost).
- A unique 32-digit “visitorID” that must be stored in the database from cookies when a player registers.
If we have this information, we send the data to our Postback endpoint. The call will look something like this:
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&ActionCode={actionCode}&ProductID={productID}
&data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&Currency={CZK}&CampaignID={campaignID}&data5={MD5hash}
Platform and support
As a tracking platform we use PostAffiliatePro, which has its own knowledge base. If you need a general integration procedure, please check the list below or contact AffilMaster directly at support@affilmaster.com.
There are several ways to connect the system, but in general we recommend S2S calls to our endpoint using the Postback method, alternatively using JSON.
- Post Affiliate Pro Support Portal
- How to integrate casino or gaming website
- S2S introduction
- HTML Pixel tracking (Postback and its variables)
- JSON variant of S2S
- Fraud protection
- Developers help
If it is not possible to use these solutions, it is possible to arrange a video call together with our partner developers.
Monitored data
The complete integration tracks several events that happen at your casino.
- Clicks leading to advertiser’s website (measured automatically by Post Affiliate Pro)
- Verified registration
- First time deposit (FTD)
- Deposit
- NGR session
- Volume of bets during session
- Bonus
- Withdrawal
Verified registration
To monitor a verified registration, it is necessary to call S2S when the player registration is successfully verified in accordance with Czech law.
https://go.affilmaster.com/scripts/sale.php?TotalCost=0&ActionCode=registration&ProductID=registration&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – define “0”.
- For ActionCode – define “registration”.
- For ProductID – define “registration”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
First Time Deposit
To track FTD, you need to call S2S when you confirm the first successful deposit of a player. This transaction must be sent only for the first successful deposit of the player. For all subsequent deposits, use the “Deposit” transaction, see paragraph below.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ActionCode=ftd&ProductID=ftd&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – use the value of deposit in CZK.
- For Currency – define “CZK”.
- For ActionCode – define “ftd”.
- For ProductID – define “ftd”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
Deposit
To keep track of a player’s deposits, you need to call S2S when you confirm the player’s second and each subsequent successful deposit.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ActionCode=deposit&ProductID=deposit&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – use the value of deposit in CZK.
- For Currency – define “CZK”.
- For ActionCode – define “deposit”.
- For ProductID – define “deposit”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
Net Gaming Revenue (NGR)
To monitor the NGR, you need to call S2S in a situation where we are counting the current player session. We recommend using the sum of the player’s wins and losses for the last hour. Losses have a positive value and wins have a negative value for the final total.
If you don’t know how to calculate NGR, we’ll help you here in this article.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ProductID=turnover&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – enter the resulting value in CZK.
- For Currency – define “CZK”.
- For ProductID – define “turnover”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
- NGR has no ActionCode defined!
Volume of bets
In order to monitor the Volume of bets, you need to call S2S in a situation where you are counting the current player session. We recommend using the sum of all bets or spins made by the player in the last hour.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ProductID=bets&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – enter the resulting value of the sum of bets and spins in CZK.
- For Currency – define “CZK”.
- For ActionCode – define “bets”.
- For ProductID – define “bets”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
Bonus
To track a player’s Bonus earnings, an S2S call needs to be made in a situation where the user’s bonus becomes an expense for the casino, i.e. when it either passes the time test or meets the wagering requirements and can therefore be withdrawn from the player’s account outside the casino to the player’s bank account.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ActionCode=bonus&ProductID=bonus&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – use the value of bonus in CZK.
- For Currency – define “CZK”.
- For ActionCode – define “bonus”.
- For ProductID – define “bonus”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
Withdrawal
To track a player’s withdrawals, an S2S call needs to be made when the user irreversibly confirms a withdrawal from their player account.
https://go.affilmaster.com/scripts/sale.php?TotalCost={amount}&Currency=CZK&ActionCode=withdrawal&ProductID=withdrawal&Data1={customerID}&OrderID={orderID-123XYZ}&VisitorID={clickID}&CampaignID={campaignID}&Data5={MD5hash}
- For TotalCost – use the value of withdrawal in CZK.
- For Currency – define “CZK”.
- For ActionCode – define “withdrawal”.
- For ProductID – define “withdrawal”.
- For Data1 – use the customer ID. (If you manage multiple casinos, make sure this value is unique across your clients)
- For OrderID – generate or use a unique transaction ID that is sufficiently complex that it will not be duplicated.
- For VisitorID – use the 32-digit hash you got from the visitor’s cookie and also record it in the user’s DB for later use.
- For CampaignID – enter the Campaign ID you received from our support, which is unique for each casino.
- For Data5 – use the encrypted value in this combination including the commas “TotalCost,OrderID,SecretKey” of the current transaction using MD5 Hash. You will receive the value of “SecretKey” from our support upon request. (Send the resulting value in Data5 only in lowercase format).
Additional information on Total Cost
Here you will find important information on formatting the value you are sending TotalCost=
- The decimal value must be separated by a period and not a comma.
- 99,56 -> 99.56
- The value must not have more than 2 decimal places. Please round the value to the nearest higher digit.
- 52.456 -> 52.46
- 52.454 -> 52.45
- The value must not contain empty decimal places
- 0.00 -> 0
- 100.00 -> 100
- 27.30 -> 27.3
- 43.260 -> 43.26
Session
The amount of data varies depending on the type of event. There are much less deposits and registrations than NGRs and bets. Also deposits and registrations can’t be grouped in a larger “bundle“. We recommend sending the NGR and volume of bets in a larger “bundle“.
How often we recommend sending individual data:
- Deposit, FTD, Bonus, Withdrawal – immediately
- Temporary registration, Verified registration – immediately
- NGR sessions, Volume of bets – sum of transactions per hour
Postback example
Postback example for a deposit of 100.5 CZK:
https://go.affilmaster.com/scripts/sale.php?TotalCost=100.5&Currency=CZK&ActionCode=deposit&ProductID=deposit&Data1=tester%40affilmaster.com&OrderID=Test_23_DE23_UNI_765454&VisitorID=oumSQ9nsZwtS4NjGAoqqenRiC0GviMu3&CampaignID=aa358615&Data5=5dc7ccbbe2dc29fd518433d6459b031f
JSON Method
For tracking sales you need to directly call scripts/track.php … more information and definition of parameters here:
Transaction “Deposit” would be sent as “sale” in this format:
[{“ac”:”deposit”,”t”:”100″,”o”:”OrderID-123XYZ”,”p”:”deposit”,”d1″:”customerID”,”cr”:”CZK”}]
After using function url_encode(), “sale” will look like this:
%5B%7B%22ac%22%3A%22deposit%22%2C%22t%22%3A%22100%22%2C%22o%22%3A%22OrderID-123XYZ%22%2C%22p%22%3A%22deposit%22%2C%22d1%22%3A%22customerID%22%2C%22cr%22%3A%22CZK%22%7D%5D
Resulting URL would look like this:
https://go.affilmaster.com/scripts/jdvy4d2.php?visitorId=ouSQ9nsZwtS4oNjGAoqqenRiC0GviMu3&accountId=&url=&referrer=&tracking=1&getParams=&ip=&sale=%5B%7B%22ac%22%3A%22deposit%22%2C%22t%22%3A%22100%22%2C%22o%22%3A%22OrderID-123XYZ%22%2C%22p%22%3A%22deposit%22%2C%22d1%22%3A%22customerID%22%2C%22cr%22%3A%22CZK%22%7D%5D
In case of any issues, please use our helpdesk at support@affilmaster.com.