Skip to main content

Send callback information

Register an attributionCallback in Adtrace.initSdk to be notified when attribution changes (for example after install or reattribution).

Parameter

ParameterTypeDescription
attributionCallbackfunctionCalled when attribution changes.

The callback receives two arguments:

ArgumentDescription
eventNameInternal event name. You can ignore this.
attributionObject 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.