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.
The SDK will call the listener function when it receives the final attribution data. Within the listener function, you'll have access to the AdjustAttribution
object. Here is a quick summary of its properties:
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 |
fbInstallReferrer | String | The Facebook Install Referrer information. This is populated if the install came from a Facebook ad. |
Facebook install referrer
The Adjust SDK receives Facebook install referrer information as a string property in the AdjustAttribution object. You can access this information by serializing the content as a JSON object.
User attribution
You can call the Adjust.getAttribution
method to get the user's current attribution. This will return all the information found in the AdjustAttribution
object.