Get attribution information
Read the user's current attribution with Adtrace.getAttribution().
Method signature
Adtrace.getAttribution();
Returns an attribution object, or values may be empty until attribution is available.
info
Attribution is available only after the backend tracks the install and triggers the attribution callback. You cannot read a reliable attribution value before initSdk completes and install attribution is processed.
Example
const attribution = Adtrace.getAttribution();
console.log(attribution.trackerToken, attribution.adid);
Attribution object fields
| Field | Type | Description |
|---|---|---|
trackerToken | string | Token of the tracker the user is attributed to. |
trackerName | string | Name of the tracker. |
network | string | Network name. |
campaign | string | Campaign name. |
adgroup | string | Ad group name. |
creative | string | Creative name. |
adid | string | Adtrace device identifier assigned after install. |
Unavailable fields may be empty or undefined.