adjust-icon

Get attribution information

When a user interacts with an Adjust link, their attribution information updates. This can happen if the user interacts with a deep link. Information about a user’s attribution is represented in the AdjustAttribution class.

ADJAttribution class properties

The AdjustAttribution class contains details about the current attribution status of the device. Any values that aren’t populated for the user are returned as a null value.

ValuesData typeDescription
trackerTokenNSStringThe token of the link to which the device is currently attributed
trackerNameNSStringThe name of the link to which the device is currently attributed
networkNSStringThe name of the network to which the device is currently attributed
campaignNSStringThe name of the campaign to which the device is currently attributed
adgroupNSStringThe name of the adgroup to which the device is currently attributed
creativeNSStringThe name of the creative to which the device is currently attributed
clickLabelNSStringThe click label that the install is tagged with
costTypeNSStringThe campaign pricing model (for example cpi)
costAmountNSNumberThe cost of the install.
costCurrencyNSStringThe 3 character ISO 4217 code of the currency associated with the cost.

Trigger a function when attribution changes

Property declaration
@property (nonatomic, weak, nullable) NSObject<AdjustDelegate> *delegate;

The SDK can listen for attribution changes and call a function when it detects an update. To configure your delegate function

  1. If you aren’t using web views, add the AdjustDelegate declaration to your AppDelegate header file.
  1. Add the delegate callback function to your app delegate implementation.
  1. Set the delegate with your Adjust config instance.

Within your delegate function, you have access to the user’s Attribution information. See the ADJAttribution class properties for a list of available properties.

Get current attribution information

Method signature
+ (void)attributionWithCompletionHandler:(nonnull ADJAttributionGetterBlock)completion;

When a user installs your app, Adjust attributes the install to a campaign. The Adjust SDK gives you access to campaign attribution details for your install. To return this information, call the [Adjust attributionWithCompletionHandler] method with a completion handler. The SDK fetches the attribution information asynchronously and passes it to your completion handler code as an ADJAttribution object.