When the OneLence SDK is initialized, it automatically detects marketing attribution parameters present in the page URL.
These parameters are stored and attached to subsequent tracked events, enabling reliable conversion attribution.
Automatic Attribution Parameter Capture
By default, the SDK recognises common marketing identifiers, including:
UTM parameters
- utm_source
- utm_medium
- utm_campaign
- utm_term
- utm_content
referral aliases
- ref
- referral
- affiliate_id
generic campaign identifiers
- click_id
- campaign_id
- cid
paid platform click identifiers
- gclid
- fbclid
- msclkid
- ttclid
- li_fat_id
- dclid
- gbraid
- wbraid
These parameters are captured during SDK initialization and refreshed on subsequent automatic page view tracking events.
Attribution Persistence Behaviour
Captured attribution parameters are stored at the visitor level.
This allows later events — including conversion signals — to retain the original marketing context even if the user navigates across pages or sessions.
Important behaviour considerations:
- attribution is evaluated when the SDK initializes
- attribution can be updated if new campaign parameters appear
- stored parameters are automatically attached to tracked events
- persistence depends on consent configuration settings
If consent is required and not yet granted, attribution signals remain temporarily in runtime memory until persistence is allowed.
Custom Query Parameter Capture
In addition to the default allowlist, developers can configure the SDK to capture additional campaign identifiers.
Example configuration:
Mark.init({
key: 'pk_xxxxx',
capture_query_params: ['sub_id', 'publisher_code']
});
Optional advanced controls include:
- capturing all query parameters
- defining deny-lists for sensitive keys
- limiting stored parameter counts
- restricting maximum value length
These controls help maintain attribution accuracy while respecting privacy and data governance requirements.
Why Correct Attribution Capture Matters
Accurate attribution parameter tracking ensures that:
- marketing performance can be evaluated reliably
- conversions are linked to the correct acquisition sources
- multi-step journeys retain campaign context
- hybrid browser-server tracking remains consistent
Understanding this capture mechanism is essential before configuring advanced tracking behaviours in the next chapter.
