SKAdNetwork postback integration for MMPs reference
This section describes the SKAdNetwork postback integration for MMPs that have registered their endpoint with Unity. Upon receiving the postback from a device, Unity uses the following postback integration process:
- Unity ensures that the signature is valid, then translates the SKAdNetwork
campaign-id
field back to the internal campaign ID. - Unity sends a JSON document to the respective MMP in a POST HTTP request, with the fields referenced in the table below.
JSON field name | Type | Description | Notes |
---|---|---|---|
ip | String | The IPv4 or IPv6 address of the device sending the postback Refer to the following example:
| |
version | String | The SKAdNetwork version Refer to the following example:
| |
app-id | Integer | The target app ID | |
campaign-id | Integer | The SKAdNetwork campaign ID Refer to the following example:
| |
source-identifier | String | The SKAdNetwork source identifier | The source-identifier field supersedes the campaign-id field in SKAdNetwork version 4.0 and later. |
coarse-conversion-value | String | The SKAdNetwork coarse conversion value set in the advertised app. | This field might not appear due to privacy requirements. For more information on how to set SKAdNetwork conversion values, review the Privacy guidelines documentation. |
postback-sequence-index | Integer | Indicates the conversion window in which the postback is sent. | To review receiving postpacks in multiple conversion windows, refer to Apple’s SKAdNetwork documentation. |
ad-network-campaign-id | String | Unity’s internal campaign ID. | |
ad-network-campaign-name | String | Unity’s internal campaign name. | |
ad-network-id | String | The ad network ID. Refer to the following example:
| |
ad-network-source-app-id | String | Unity's internal Source App ID. | This is only available if source-app-id is present in the original postback, based on privacy requirements. |
source-app-id | Integer | The publisher Source App ID. | <Note:This is only available if source-app-id is present in the original postback, based on privacy requirements. |
transaction-id | String | The SKAdNetwork postback transaction ID. | |
fidelity-type | Integer | A SKAdNetwork postback fidelity type Use the following values for fidelity_type :
| This postback is available for SKAd version 2.2 and later. |
attribution-signature | String | The attribution signature. | |
redownload | Boolean | When true , this indicates that the user re-downloaded the app from the app store | |
conversion-value | Integer | The SKAdNetwork conversion value (CV) set in the advertised app | Important: This field might not be present depending on privacy requirements. For more information, refer to the SKAdNetwork documentation on setting conversion values. |
timestamp | String | The time that Unity received the SKAdNetwork postback | Important: Use the 10-digit Unix format for all timestamps. Refer to the following example of correct Unix formatting:
|
SKAdNetwork Postback example
The following example HTTP illustrates a request being sent for an MMP registered with “https://mmp.example.com/skadnetwork-postback
” as their endpoint:
POST /skadnetwork-postback
HTTP/1.1 Host: mmp.example.com
Content-Type: application/json
{
"attribution-signature" : "MEYCIQD3y3EyGS0VHWU\/aniKNdPVg+oBnuxPtO\/Nmb\/Csly4UwIhAMzJrfQUEu2lsR79PIPReHzQHHqLERgHZDlydHKH61ul",
"source-app-id" : 0,
"conversion-value" : 0,
"app-id" : 123456789,
"transaction-id" : "6f3cfb40-4274-4dc0-be4d-df1410184a61",
"version" : "4.0",
"ad-network-id" : "4dzt52r2t5.skadnetwork",
"timestamp": "1597156649200",
"ip": "1.1.1.1",
"ad-network-campaign-name": "skadnetwork_campaign_1",
"ad-network-source-app-id": "h4sH3d",
"did-win" : true,
"source-identifier" : "0003",
"fidelity-type" : 1,
"postback-sequence-index" : 0,
"coarse-conversion-value": "high",
"redownload" : false
}