> ## Documentation Index
> Fetch the complete documentation index at: https://help.airbridge.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SKAdNetwork Integration

<Info>
  **Note**

  This guide is for media partners (ad channels). If you’re an Airbridge user who would like to integrate an ad channel you’re currently using with Airbridge, you can submit a request by navigating to **\[Integrations]>\[Ad Channel Integration]** and clicking **Request integration** in the top right corner.
</Info>

SKAN integration is required per ad channel to view SKAN data in Airbridge. It is a different integration module from the integration using tracking links.

## Implementing SKAN Integration

Below is the general SKAN data flow.

1. The advertiser provides the conversion values from the iOS device to the ad channel.
2. The ad channel sends the conversion values to Airbridge.
3. Airbridge sends the event data as per conversion value mapping to the ad channel.

SKAN integration is required to support the second and third steps of the above process.

### Sending SKAN conversion values from the ad channel to Airbridge

The ad channel needs to forward the received SKAN postbacks to the Airbridge SKAN Postback API. Choose one of the following methods for transmission.

The data transmission method differs by parameter. If the source is SKAdNetwork Postback, it needs to be forwarded as is without any additional processing. If the source is an ad network, it needs to be decoded by the ad channel, or additional information needs to be added before transmission.

<AccordionGroup>
  <Accordion title="POST Method">
    The SKAN postbacks can be sent to Airbridge using the POST method.

    ###### HTTP Protocol

    | Method       | POST                                           |
    | ------------ | ---------------------------------------------- |
    | Endpoint     | `https://postback.airbridge.io/skadnetwork/v1` |
    | Content-Type | application/json                               |
    | Response     | 200: OK<br />400: Validation Error             |

    ###### Body

    The body must include the information listed below. Campaign parameters are optional.

    * All information included in the SKAN postback
    * The channel name that received the attribution credit (attributed-channel)
    * IP address and postback timestamp provided by the iOS device

    Refer to the table below for details about the required parameters.

    | Parameter                      | Is it required?                        | Description                                                                                                                                                                            | Source               | Type              |
    | ------------------------------ | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----------------- |
    | version                        | true                                   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)<br />(\* Send NULL for versions earlier than 2.0) | SKAdNetwork Postback | string (nullable) |
    | ad-network-id                  | true                                   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | string            |
    | campaign-id                    | true<br />(\* version 3.0 and earlier) | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | integer           |
    | source-identifier              | true<br />(\* version 4.0 and later)   | [SKAdNetwork](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install-validation_postback)<br />(\* Send NULL for versions earlier than 4.0)               | SKAdNetwork Postback | string            |
    | transaction-id                 | true                                   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | string            |
    | app-id                         | true                                   | [SkAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | integer           |
    | attribution-signature          | true                                   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | string            |
    | redownload                     | true<br />(\* version 2.0 and later)   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)<br />(\* Send NULL for versions earlier than 2.0) | SKAdNetwork Postback | boolean           |
    | fidelity-type                  | true<br />(\* version 2.2 and later)   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/signing_and_providing_ads)<br />(\* Send NULL for versions earlier than 2.2)                | SKAdNetwork Postback | Integer           |
    | did-win                        | true<br />(\* version 3.0 and later)   | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/receiving_ad_attributions_and_postbacks)<br />(\* Send NULL for versions earlier than 3.0)  | SKAdNetwork Postback | boolean           |
    | postback-sequence-index        | true<br />(\* version 4.0 and later)   | [SKAdNetwork](https://developer.apple.com/documentation/storekit/skadnetwork/receiving_ad_attributions_and_postbacks)<br />(\* Send NULL for versions earlier than 4.0)                | SKAdNetwork Postback | integer           |
    | source-app-id                  | false                                  | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | integer           |
    | conversion-value               | false                                  | [SKAdNetwork Documentation](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install_validation_postback)                                                   | SKAdNetwork Postback | integer           |
    | coarse-conversion-value        | false                                  | [SKAdNetwork](https://developer.apple.com/documentation/storekit/skadnetwork/verifying_an_install-validation_postback)                                                                 | SKAdNetwork Postback | string            |
    | attributed-channel             | true                                   | Ad channel that received the attribution credit(Ad channel name registered with Airbridge)                                                                                             | Ad Network           | string            |
    | attributed-campaign            | false                                  | Attributed Campaign                                                                                                                                                                    | Ad Network           | string            |
    | attributed-campaign-id         | false                                  | Attributed Campaign ID                                                                                                                                                                 | Ad Network           | string            |
    | attributed-ad-group            | false                                  | Attributed Ad Group                                                                                                                                                                    | Ad Network           | string            |
    | attributed-ad-group-id         | false                                  | Attributed Ad Group ID                                                                                                                                                                 | Ad Network           | string            |
    | attributed-ad-creative         | false                                  | Attributed Ad Creative                                                                                                                                                                 | Ad Network           | string            |
    | attributed-ad-creative-id      | false                                  | Attributed Ad Creative ID                                                                                                                                                              | Ad Network           | string            |
    | attributed-sub-publisher       | false                                  | Attributed Sub Publisher                                                                                                                                                               | Ad Network           | string            |
    | attributed-sub-sub-publisher-1 | false                                  | Attributed Sub Sub Publisher 1                                                                                                                                                         | Ad Network           | string            |
    | attributed-sub-sub-publisher-2 | false                                  | Attributed Sub Sub Publisher 2                                                                                                                                                         | Ad Network           | string            |
    | attributed-sub-sub-publisher-3 | false                                  | Attributed Sub Sub Publisher 3                                                                                                                                                         | Ad Network           | string            |
    | ip                             | false                                  | Device Public IP                                                                                                                                                                       | Ad Network           | string            |
    | timestamp                      | true                                   | The time the ad network received the postback in the iOS device. Provide a 13-digit UNIX timestamp.                                                                                    | Ad Network           | integer           |

    ###### Example

    ```markdown cURL lines theme={"theme":{"light":"github-dark-dimmed","dark":"github-dark-dimmed"}}
    curl --location --request POST 'https://postback.airbridge.io/skadnetwork/v1' \
    --header 'Content-type: application/json' \
    --data-raw '{
        "version":"2.0",
        "ad-network-id": "abcabcabc.skadnetwork",
        "campaign-id": 99,
        "transaction-id": "68eb3d91-15f5-44ee-9267-25c7655c20b6",
        "app-id": 888707086,
        "attribution-signature": "MDYCGQCsQ4y8d4BlYU9b8Qb9BPWPi+ixk/OiRysCGQDZZ8fpJnuqs9my8iSQVbJO/oU1AXUROYU=",
        "redownload": false,
        "source-app-id": 888707074,
        "conversion-value": 63,
        "attributed-channel": "adnetwork_abc",
        "attributed-campaign": "test_campaign",
        "attributed-campaign-id": "test_campaign_id",
        "ip": "192.0.2.0",
        "timestamp": 1607678183995
    }'
    ```
  </Accordion>

  <Accordion title="307 Redirect">
    The SKAN postbacks can be sent to Airbridge using the 307 Redirect method.

    <Info>
      **Checklist for Ad Networks**

      Transmit the payload containing the required parameters and parameters related to the ad campaign that received the attribution credit to the Airbridge postback server (`postback.airbridge.io`). Upon successful transmission, a 200 response is expected.
    </Info>

    ###### HTTP Protocol

    | Method   | 307 Redirect                                   |
    | -------- | ---------------------------------------------- |
    | Endpoint | `https://postback.airbridge.io/skadnetwork/v1` |
    | Response | 200: OK<br />400: Validation Error             |

    ###### Redirect URL

    Refer to the table below and add information to the GET parameter in the Redirect URL. The ad channel that received the attribution credit (attributed-channel) must be included. Campaign parameters are optional.

    | Parameter                      | Is it required? | Description                                                                                 | Source     |
    | ------------------------------ | --------------- | ------------------------------------------------------------------------------------------- | ---------- |
    | attributed-channel             | true            | Ad channel that received the attribution credit (Ad channel name registered with Airbridge) | Ad Network |
    | attributed-campaign            | false           | Attributed Campaign                                                                         | Ad Network |
    | attributed-campaign-id         | false           | Attributed Campaign ID                                                                      | Ad Network |
    | attributed-ad-group            | false           | Attributed Ad Group                                                                         | Ad Network |
    | attributed-ad-group-id         | false           | Attributed Ad Group ID                                                                      | Ad Network |
    | attributed-ad-creative         | false           | Attributed Ad Creative                                                                      | Ad Network |
    | attributed-ad-creative-id      | false           | Attributed Ad Creative ID                                                                   | Ad Network |
    | attributed-sub-publisher       | false           | Attributed Sub Publisher                                                                    | Ad Network |
    | attributed-sub-sub-publisher-1 | false           | Attributed Sub Sub Publisher 1                                                              | Ad Network |
    | attributed-sub-sub-publisher-2 | false           | Attributed Sub Sub Publisher 2                                                              | Ad Network |
    | attributed-sub-sub-publisher-3 | false           | Attributed Sub Sub Publisher 3                                                              | Ad Network |

    ###### Example

    `https://postback.airbridge.io/skadnetwork/v1?attributed-channel=adnetwork_abc&attributed-campaign=test_campaign&attributed-campaign-id=test_campaign_id`
  </Accordion>
</AccordionGroup>

### Sending SKAN data from Airbridge to ad channels

The ad channel utilizes the SKAdNetwork Conversion Value Config API to retrieve the advertiser-provided conversion value settings and subsequently decodes the conversion value using those settings.

* [SKAdNetwork Conversion Value Config API](/en/references/skadnetwork-configuration)

<link rel="alternate" hrefLang="en" href="https://help.airbridge.io/en/guides/skadnetwork-integration-guide" />

<link rel="alternate" hrefLang="ko" href="https://help.airbridge.io/ko/guides/skadnetwork-integration-guide" />
