Transaction Notification
From Wiki
→ Deutsch . Español . Français . Italiano . Nederlands . Polski . Português (Brasil) . Svenska .
Contents |
Transaction Notification
We offer our Publishers a near to real-time reporting feature which ensures that every time a transaction is recorded, a notification is sent to the Publisher's system with all the relevant details associated to the transaction.
To gain access to this feature you first need to have it enabled which is done by raising a ticket from your Publisher Interface outlining the request.
Setting Up
- You find the Transaction Notification link under Advanced once you have been activated for this feature
- As outlined below, there are four settings which need to be considered:
Call-back URL: This is the path to the script to which the relevant data will be sent. From here, your file will need to custom manage the data and parse it into the components of your system you deem necessary. This could for example be a PHP file on your respective domain, but our Transaction Notification is not just limited to PHP. Supported ports are 80 and 443.
Call-back method: Here you can choose if you want to get the data delivered as a GET or POST request.
Product Data: Tick this box if you wish for data about the actual products bought to be passed back. Data will be delivered for GET and POST method. This is dependant on the Advertiser implementing Product Level Tracking - and furthermore actively sharing this data with Publishers - which may not always be the case. Product data placeholder: !!!products!!!
Click Source Data: This will be data relating to the initial link clicked to begin the path for the transaction which occurred and it is delivered for GET and POST method. Click source data placeholders: !!!clickTime!!!, !!!url!!!, !!!phrase!!!, !!!searchEngine!!!
- Once you’ve entered the correct data, please click on Submit. You should then see a message notifying you that ‘Your Changes Have Been Successfully Saved’.
Request Types
GET Request
The transaction data will be delivered as a GET request to the URL you have specified and placeholders can be utilised to modify the path or request part of the URL to make the request dynamic. The macros are case sensitive, please make sure to configure them as mentioned below.
Placeholders
Placeholder | Description | Example |
!!!affiliateId!!!
|
The Publisher ID associated to the transaction | 45628 |
!!!bannerId!!!
|
The Creative ID linked to the converting click | 291555 |
!!!clickRef!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickRef2!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickRef3!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickRef4!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickRef5!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickRef6!!!
|
Click/View identifier/reference specified by the Publisher. See Publisher ClickRef | LINKCMP2013-06 |
!!!clickThroughTime!!!
|
Click date in format %Y-%m-%d %H:%i:%s (timezone: UTC)
|
2013-06-13 12:00:00 |
!!!clickTime!!!
|
Click date in format %Y-%m-%d %H:%i:%s (timezone: UTC)
|
2013-06-13 12:00:00 |
!!!commission!!!
|
Commission amount awarded for the transaction | 1.64 |
!!!commissionGroups!!!
|
Commission group breakdown associated with the transaction (in JSON format) | See below under POST Request (JSON) / Example Data |
!!!groupId!!!
|
The creative group ID linked to the converting click | 137726 |
!!!merchantId!!!
|
The Advertiser program ID that the transaction belongs to | 3661 |
!!!phrase!!!
|
Search engine phrase. It is extracted from the referrer of the click. | Electronic music |
!!!products!!!
|
Product breakdown associated with the transaction (in JSON format) | See below under POST Request (JSON) / Example Data |
!!!searchEngine!!!
|
Search engine name. It is extracted from the referrer of the click. | MSN Live Search |
!!!transactionAmount!!!
|
Total sale amount in the currency of the Advertiser program (!!!transactionCurrency!!!) | 26.09 |
!!!transactionDate!!!
|
Transaction date in format %Y-%m-%d %H:%i:%s (timezone: UTC)
|
2013-06-13 12:05:00 |
!!!transactionId!!!
|
Our unique Transaction ID | 105956531 |
!!!url!!!
|
Referring click URL | http://www.publisher-domain.com/advertiser/product/ |
!!!transactionCurrency!!!
|
The Advertiser's program currency. This is the currency of the affiliate transaction (!!!transactionAmount!!! and !!!commission!!!). This is the 3 digit uppercase currency code | GBP |
!!!trackedCurrency!!!
|
The original currency in which the purchase was made. This is only available if it's a different currency compared to the Advertiser's program currency. This is the 3 digit uppercase currency code | EUR |
!!!trackedAmount!!!
|
The total sale amount in the original purchase currency (!!!trackedCurrency!!!) | 20.04 |
Example URL
http://www.publisher-domain.com/!!!merchantId!!!/pixel.php?clk=!!!clickRef!!!&cnv=!!!transactionId!!!&com=!!!commission!!!
POST Request (JSON)
The transaction data will be delivered as a JSON package using a POST request named AwinTransactionPush
to the URL you have specified. Not all keys are available & sent for all transactions (e.g. clickRef2 is only available for the transaction if this was passed in the winning click). Expected content-type is "application/x-www-form-urlencoded; charset=UTF-8".
Example Data
echo $_POST["AwinTransactionPush"]; = {"transactionId":"105956531","transactionDate":"2013-06-13 12:05:00","transactionCurrency":"GBP","transactionAmount":"26.09","affiliateId":"45628","merchantId":"3661","groupId":"0","bannerId":"0","clickRef":"LINKCMP2013-06","clickThroughTime":"2013-06-13 12:00:00","ip":"127.0.0.1","commission":"1.64","clickTime":"2013-06-13 12:00:00","url":"http:\/\/www.publisher-domain.com\/advertiser\/product\/","phrase":"Electronic music","searchEngine":"MSN Live Search","commissionGroups":[{"id":"47963","name":"CD","code":"CD","description":"CD"},{"id":"47965","name":"DVD","code":"DVD","description":"DVD"}],"products":[{"productName":"The Knife \u2013 Silent Shout","unitPrice":"5.55","skuType":"","skuCode":"B000EMSUQA","quantity":"2","category":"Electronic Music","cgId":"47963"},{"productName":"Sigur Ros - Heima","unitPrice":"14.99","skuType":"","skuCode":"B000EMSUQA","quantity":"1","category":"Music DVD","cgId":"47965"}]}
JSON Decoded Example Data
var_dump(json_decode($_POST["AwinTransactionPush"], true)); = array(17) { ["transactionId"]=> string(9) "105956531" ["transactionDate"]=> string(19) "2013-06-13 12:05:00" ["transactionCurrency"]=> string(3) "GBP" ["transactionAmount"]=> string(5) "26.09" ["trackedCurrency"]=> string(3) "EUR" ["trackedAmount"]=> string(5) "34.04" ["affiliateId"]=> string(6) "45628" ["merchantId"]=> string(4) "3661" ["groupId"]=> string(1) "0" ["bannerId"]=> string(1) "0" ["clickRef"]=> string(14) "LINKCMP2013-06" ["clickRef4"]=> string(12) "User82828211" ["clickThroughTime"]=> string(19) "2013-06-13 12:00:00" ["commission"]=> string(4) "1.64" ["clickTime"]=> string(19) "2013-06-13 12:00:00" ["url"]=> string(55) "http://www.publisher-domain.com/advertiser/product/" ["phrase"]=> string(16) "Electronic music" ["searchEngine"]=> string(15) "MSN Live Search" ["commissionGroups"]=> array(2) { [0]=> array(4) { ["id"]=> string(5) "47963" ["name"]=> string(2) "CD" ["code"]=> string(2) "CD" ["description"]=> string(2) "CD" } [1]=> array(4) { ["id"]=> string(5) "47965" ["name"]=> string(3) "DVD" ["code"]=> string(3) "DVD" ["description"]=> string(3) "DVD" } } ["products"]=> array(2) { [0]=> array(7) { ["productName"]=> string(26) "The Knife – Silent Shout" ["unitPrice"]=> string(4) "5.55" ["skuType"]=> string(0) "" ["skuCode"]=> string(10) "B000EMSUQA" ["quantity"]=> string(1) "2" ["category"]=> string(16) "Electronic Music" ["cgId"]=> string(5) "47963" } [1]=> array(7) { ["productName"]=> string(17) "Sigur Ros - Heima" ["unitPrice"]=> string(5) "14.99" ["skuType"]=> string(0) "" ["skuCode"]=> string(10) "B000EMSUQA" ["quantity"]=> string(1) "1" ["category"]=> string(9) "Music DVD" ["cgId"]=> string(5) "47965" } } }
If you have any concerns on the performance of this feature, please contact Technical Services for a status update.