Client-side Attribution Flow
Client-side attribution is a browser-based mechanism that allows Onside to identify and track visitors.
Flow Description
When a new user lands on the store page, Onside creates a persistent token (onside_token) stored in the browser. This token is used to associate install link requests with the same visitor and to maintain long-term attribution across sessions.
Initial visit (no existing cookies)
When a visitor lands on the store for the first time, no Onside cookies are found.
The client generates and stores a unique identifier called onside_token (using cookies).
This token acts as the anonymous visitor ID for future attribution events.
Install link request
When the user triggers an install action, the client sends a request to the backend API responsible for generating the install link.
The onside_token is included in this request to ensure the install can be attributed to the same visitor session.
The token itself does not contain personal data — it only serves as a unique visit reference.
Token lifetime and renewal
The onside_token is valid for 6 months from the last visit.
Each time the user revisits the website, the expiration date of the token is automatically extended by another 6 months.
This ensures smooth attribution for recurring visitors without requiring re-identification.
Returning visitors
If the visitor returns within 6 months, the existing onside_token is reused for all future requests.
If the token has expired or the user manually cleared their cookies, a new token will be generated during the next visit.
Example Sequence
First visit
No cookies found → create new onside_token
Token stored
Click "Install"
Request sent with onside_token
Install attributed to same visitor
Visit after 3 months
Token still valid → expiration extended
Token reused
Visit after 8 months
Token expired → new one generated
New attribution session started
Token Details
Name
onside_token
Storage
Browser cookie
Validity
6 months
Renewal policy
Extended on every new visit
Purpose
Identify unique visitors for install attribution
Contains PII
No— anonymous token only
Notes & Recommendations
onside_token
does not contain user data and is only used for attribution purposes.For multiple subdomains (e.g.,
onside.io
andstore.onside.io
), set the cookie domain to.onside.io
to ensure tracking consistency across subdomains.Clearing cookies or browser data will reset attribution and trigger a new token generation.
The backend should use
onside_token
as the visitor identifier for attributing install link requests.
Last updated
Was this helpful?