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:

  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 field nameTypeDescriptionNotes
ipStringThe IPv4 or IPv6 address of the device sending the postback
Refer to the following example:
  • "ip" : "198.51.100.1"
versionStringThe SKAdNetwork version
Refer to the following example:
  • "version" : "2.0"
app-idIntegerThe target app ID
campaign-idIntegerThe SKAdNetwork campaign ID
Refer to the following example:
  • "campaign-id" : 23
source-identifierStringThe SKAdNetwork source identifierThe source-identifier field supersedes the campaign-id field in SKAdNetwork version 4.0 and later.
coarse-conversion-valueStringThe 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-indexIntegerIndicates 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-idStringUnity’s internal campaign ID.
ad-network-campaign-nameStringUnity’s internal campaign name.
ad-network-idStringThe ad network ID.
Refer to the following example:
  • "ad-network-id" : "1232"
ad-network-source-app-idStringUnity'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-idIntegerThe publisher Source App ID.<Note:This is only available if source-app-id is present in the original postback, based on privacy requirements.
transaction-idStringThe SKAdNetwork postback transaction ID.
fidelity-typeIntegerA SKAdNetwork postback fidelity type
Use the following values for fidelity_type:
  • 0: View-through ad presentation
  • 1: StoreKit-rendered ad
This postback is available for SKAd version 2.2 and later.
attribution-signatureStringThe attribution signature.
redownloadBooleanWhen true, this indicates that the user re-downloaded the app from the app store
conversion-valueIntegerThe SKAdNetwork conversion value (CV) set in the advertised appImportant: This field might not be present depending on privacy requirements. For more information, refer to the SKAdNetwork documentation on setting conversion values.
timestampStringThe time that Unity received the SKAdNetwork postbackImportant: 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

{
  "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
}