Install with the CLI
Manual setup
1
Environment variable
.env:2
LucentInit component
app/components/lucent-init.tsx:3
Expose the key via the root loader (manual)
app/root.tsx:Notes
- Remix never ships
process.envto the browser. The loader pattern is the canonical way to expose public keys; don’t try to readprocess.envdirectly from a client component. LucentInitrenders nothing — it only exists to run the tracker inside auseEffectso it initializes on mount and stops on unmount.- Prefix the env var with
LUCENT_(no public prefix) because it’s consumed server‑side by the loader before being handed to the client.