-
Couldn't load subscription status.
- Fork 42
Attribution Callback
Obaied edited this page Nov 2, 2016
·
2 revisions
You can register a listener to be notified of tracker attribution changes. Due to the different sources considered for attribution, this information cannot by provided synchronously. The simplest way is to create a single anonymous listener which is going to be called each time your user's attribution value changes:
With the AdjustConfig instance, before starting the SDK, add the anonymous listener:
var adjustConfig = new AdjustConfig(appToken, environment);
adjustConfig.setAttributionCallbackListener(function(attribution) {
// Printing all attribution properties.
console.log("Attribution changed!");
console.log(attribution.trackerToken);
console.log(attribution.trackerName);
console.log(attribution.network);
console.log(attribution.campaign);
console.log(attribution.adgroup);
console.log(attribution.creative);
console.log(attribution.clickLabel);
});
Adjust.create(adjustConfig);Within the listener function you have access to the attribution parameters. Here is a quick summary of its properties:
-
trackerTokenthe tracker token of the current install. -
trackerNamethe tracker name of the current install. -
networkthe network grouping level of the current install. -
campaignthe campaign grouping level of the current install. -
adgroupthe ad group grouping level of the current install. -
creativethe creative grouping level of the current install. -
clickLabelthe click label of the current install.
Please make sure to consider our applicable attribution data policies.
Basic Integration
Additional Features