Skip to main content

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

FieldTypeDescription
trackerTokenstringToken of the tracker the user is attributed to.
trackerNamestringName of the tracker.
networkstringNetwork name.
campaignstringCampaign name.
adgroupstringAd group name.
creativestringCreative name.
adidstringAdtrace device identifier assigned after install.

Unavailable fields may be empty or undefined.