<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: 16.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKAdImpression/sourceIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAdImpression(py)sourceIdentifier"
  },
  "title" : "sourceIdentifier"
}
-->

# sourceIdentifier

A four-digit integer that ad networks define to represent the ad campaign.

```
var sourceIdentifier: NSNumber { get set }
```

## Discussion

The [`sourceIdentifier`](/documentation/StoreKit/SKAdImpression/sourceIdentifier) key is available for ad impressions that use SKAdNetwork 4 and later. The [`sourceIdentifier`](/documentation/StoreKit/SKAdImpression/sourceIdentifier), also known as the *hierarchical source identifier*, replaces and extends the campaign identifier value, [`adCampaignIdentifier`](/documentation/StoreKit/SKAdImpression/adCampaignIdentifier).

Ad networks and developers define the meaning of the hierarchical source identifier. This integer can have up to four digits. You can encode information about your advertisement in each set of digits; you may receive two, three, or all four digits of the [`sourceIdentifier`](/documentation/StoreKit/SKAdImpression/sourceIdentifier) in the first winning postback, depending on the ad impression’s postback data tier. For more information about the value you may get in the postback, see [Receiving postbacks in multiple conversion windows](/documentation/StoreKit/receiving-postbacks-in-multiple-conversion-windows).

> Note:
> An install-validation postback represents this integer as a string in its `source-identifier` parameter. For more details about the parameters of an install-validation postback, see <doc://com.apple.storekit/documentation/StoreKit/identifying-the-parameters-in-install-validation-postbacks>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)