SKAdNetwork postback integration reference

Read time 5 minutes

Refer to the table below for the JSON fields used in a SKAdNetwork postback integration for Mobile Measurement Partners (MMPs) that have registered their endpoint with Unity.

Upon receiving the postback from a device, Unity uses the following postback integration process:

  1. Unity ensures that the signature is valid, then translates the SKAdNetwork campaign-id field back to the internal campaign ID.
  2. Unity sends a JSON document to the respective MMP in a POST HTTP request, with the fields referenced in the table below.

JSON document fields

Unity sends the following information to your MMP in a SKAdNetowrk postback JSON document:

JSON field nameTypeDescription
ip
String

The IPv4 or IPv6 address of the device sending the postback Refer to the following example: "ip" : "198.51.100.1"

version
String

The SKAdNetwork version Refer to the following example: "version" : "2.0"

app-id
IntegerThe target app ID
campaign-id
Integer

The SKAdNetwork campaign ID Refer to the following example: "campaign-id" : 23

source-identifier
String

The SKAdNetwork source identifier Note: the source-identifier field supersedes the campaign-id field in SKAdNetwork version 4.0 and later.

coarse-conversion-value
StringThe SKAdNetwork coarse conversion value set in the advertised app. Note: This field might not appear due to privacy requirements.
postback-sequence-index
IntegerIndicates the conversion window in which the postback is sent.
ad-network-campaign-id
StringUnity’s internal campaign ID.
ad-network-campaign-name
StringUnity’s internal campaign name.
ad-network-id
String

The ad network ID. Refer to the following example: "ad-network-id" : "1232"

ad-network-source-app-id
String

Unity's internal Source App ID. Note: 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
StringThe SKAdNetwork postback transaction ID.
fidelity-type
Integer

A SKAdNetwork postback fidelity type Note: This postback is available for SKAd version 2.2 and later. Use the following values for fidelity_type: 0: View-through ad presentation 1: StoreKit-rendered ad

attribution-signature
StringThe attribution signature.
redownload
Boolean

When true, this indicates that the user re-downloaded the app from the app store

conversion-value
IntegerThe SKAdNetwork conversion value (CV) set in the advertised app Important: This field might not be present depending on privacy requirements.
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: August 4, 2020, 07:25 UTC: "timestamp": "1596525944"

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
Content-Length: 577

{
  "ip": "198.51.100.1",
  "version": "4.0",
  "app-id": 1234567890,
  "campaign-id": 23,
  "source-identifier": "2a3b",
  "coarse-conversion-value": "medium",
  "postback-sequence-index": 0,
  "ad-network-campaign-id": "546b9257365399e0031572bd",
  "ad-network-campaign-name": "Summer Launch Campaign",
  "ad-network-id": "1232",
  "ad-network-source-app-id": "com.unity.source.app",
  "source-app-id": 987654321,
  "transaction-id": "abcd1234-ef56-7890-gh12-ijkl3456mnop",
  "fidelity-type": 1,
  "attribution-signature": "MEYCIQDW...snip...i7XjFg==",
  "redownload": false,
  "conversion-value": 5,
  "timestamp": "1596525944"
}