Set referrer
Call setReferrer to manually trigger an sdk_click when you need to pass click or attribution data outside the normal tracker redirect flow.
Method signature
Adtrace.setReferrer(referrer);
| Parameter | Type | Description |
|---|---|---|
referrer | string | URL-encoded referrer string for the click. |
Example
Adtrace.setReferrer('adtrace_external_click_id%3DEXTERNAL_CLICK_ID');
Important
Call setReferrer as close as possible to Adtrace.initSdk for correct attribution.
The referrer value must be URL-encoded.
Typical init flow
Adtrace.initSdk({
appToken: '{YourAppToken}',
environment: 'sandbox',
logLevel: 'verbose',
});
Adtrace.setReferrer('adtrace_external_click_id%3DEXTERNAL_CLICK_ID');