Attribution callbacks
You can register a delegate callback to notify you of tracker attribution changes. The Adjust SDK cannot provide this information synchronously. This is due to the different sources considered for attribution.
Follow the steps in this article to implement the optional delegate protocol in your app.
ADJConfig
instance. This means you will need to add the setDelegate
call before you call the appDidLaunch
method.
- If you are not using web views, add the
AdjustDelegate
declaration to yourAppDelegate
header file.
- If you are not using web views, add the delegate callback function to your app delegate implementation.
- Set the delegate with your Adjust config instance.
The SDK will call the delegate function after receiving its final attribution data. Within the delegate function, you will have access to the attribution
object.
All properties are returned as a JSON object. Any values that are not populated will be sent back as nil
.
costType
, costAmount
, and costCurrency
) are only available when the needsCost
property on the config object is set to true
.
Values | Data type | Description |
---|---|---|
trackerToken | String | The token of the tracker to which the device is currently attributed. |
trackerName | String | The name of the tracker to which the device is currently attributed. |
network | String | The name of the network to which the device is currently attributed. |
campaign | String | The name of the campaign to which the device is currently attributed. |
adgroup | String | The name of the adgroup to which the device is currently attributed. |
creative | String | The name of the creative to which the device is currently attributed. |
clickLabel | String | The click label that the install is tagged with. |
adid | String | The unique Adjust ID assigned to the device. |
costType | String | The campaign pricing model (e.g. cpi). |
costAmount | Number | The cost of the install. |
costCurrency | String | The code of the currency associated with the cost. This should be a three character string that follows the ISO 4217 standard |
User attribution
You can call the attribution
method to get the user's current attribution. This will return all the information found in the ADJAttribution
class as a JSON object.