Skip to main content
Tracelit is designed privacy-first by default. This page covers what is and isn’t tracked, how to let users opt out, and what you need to know for GDPR and similar regulations.

Privacy defaults

You get all of this without any configuration:

Opt users out

If your app has a cookie consent banner or privacy settings page, use optOut() to stop all tracking when a user declines:
optOut() does two things immediately:
  1. Stops all event capture — no more data is sent
  2. Persists the opt-out preference in localStorage
On the next page load, tracking will not start at all. The user won’t be tracked until they opt back in.

Opt users back in

optIn() clears the opt-out flag. Tracking resumes on the next page load.

Check opt-out status

Use this to show or hide consent UI based on whether the user has already opted out:


Block elements from replay

If there are specific elements on your page that should never appear in session recordings, add the tl-block class:
To exclude an element from click and interaction tracking (but still show it in the replay):

Destroy the tracker

Call destroy() to completely remove Tracelit from the page — all event listeners are removed, all monkey-patched globals are restored, all timers are cancelled, and any buffered events are flushed:
This is useful in test teardown, when a user deletes their account, or when you need to fully remove tracking during the session (as opposed to just calling optOut() which persists across page loads).

GDPR summary

Delete the user’s sessions and data via the Tracelit dashboard. Also call reset() on the client when the user logs out so no future sessions are linked to them on that device.
Yes. If you never call identify(), all sessions are anonymous. Tracelit still tracks sessions using a random ID stored in localStorage — but there’s no way to link that ID to a real person unless you call identify().
Check the Tracelit dashboard or contact support at hey@tracelit.io for current data residency options.

API reference