Appearance
Consent and privacy
Where you need a visitor's consent before storing data on their device or tracking them, such as in the EU and UK, turn on consent mode.
js
vectelle.init('pk_live_REPLACE_ME', {
endpoint: 'https://INGEST_HOST/v1/batch',
requireConsent: true,
})With requireConsent: true:
- Nothing is written to the device. The anonymous id, session and queued events are kept in memory only.
- Nothing is sent. Events you track are queued in memory and wait.
When your consent banner gets an answer, tell the SDK:
js
// The visitor accepted
vectelle.consent(true)
// The visitor declined
vectelle.consent(false)| Call | Effect |
|---|---|
consent(true) | Saves to the device from now on, and sends the events queued so far. |
consent(false) | Clears the queue and everything Vectelle stored on the device, and stops tracking. Later track() calls are ignored. |
If the visitor accepted on an earlier visit, call consent(true) straight after init() on every page load. Vectelle doesn't remember the answer for you: your consent tool is the source of truth.
The consent state (granted, denied or unknown) is recorded with every event.
What the server does
- IP addresses are never stored. The IP is used to look up the country, if enabled, and then discarded.
- Personal data is scrubbed. Emails, card numbers and US social security numbers are redacted from all text, values under keys such as
password,tokenandemailare removed, and sensitive URL parameters are redacted. - Email-shaped user ids are hashed before they're stored.
This scrubbing is pattern-based. It catches common mistakes, but it can't recognize every kind of personal data. Avoid sending personal data in the first place: see Don't send personal data.
Your responsibilities
Consent mode is a tool, not a compliance guarantee. You decide when consent is needed, what your privacy notice says, and how to answer requests from people to see or delete their data.