Send callback information
Register an attributionCallback in Adtrace.initSdk to be notified when attribution changes (for example after install or reattribution).
Parameter
| Parameter | Type | Description |
|---|---|---|
attributionCallback | function | Called when attribution changes. |
The callback receives two arguments:
| Argument | Description |
|---|---|
eventName | Internal event name. You can ignore this. |
attribution | Object with current attribution fields. See Get attribution information. |
Example
Adtrace.initSdk({
appToken: '{YourAppToken}',
environment: 'sandbox',
logLevel: 'verbose',
attributionCallback: function (eventName, attribution) {
console.log('Attribution changed', attribution);
// attribution.adid is available after install is tracked
},
});
Verify install via callback
If attributionCallback fires and attribution.adid is present, the install was recorded successfully. See Test the integration.