Transaction Notification

From Wiki

Jump to: navigation, search

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

  1. You find the transaction notification link under Advanced once you have been activated for this feature

  2. 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.

    • Call-back method: Here you can choose how you want to get the data delivered. See below for examples of how you can use each one.

    • Product Data: Tick this box if you wish for data about the actual products bought to be passed back. 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. (If in doubt please get in touch with the advertiser program account contact.)

    • Click Source Data: This will be data relating to the initial link clicked to begin the path for the transaction which occurred.

  3. 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 macros can be utilised to modify the path or request part of the URL to make the request dynamic.

Macros

Macro 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 LINKCMP2013-06
!!!clickRef2!!! Click/View identifier/reference specified by the publisher LINKCMP2013-06
!!!clickRef3!!! Click/View identifier/reference specified by the publisher LINKCMP2013-06
!!!clickRef4!!! Click/View identifier/reference specified by the publisher LINKCMP2013-06
!!!clickRef5!!! Click/View identifier/reference specified by the publisher LINKCMP2013-06
!!!clickRef6!!! Click/View identifier/reference specified by the publisher 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 Electronic music
!!!products!!! Product breakdown associated with the transaction (in JSON format) See below under POST Request (JSON) / Example Data
!!!searchEngine!!! Search engine name 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).


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.

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button