fingerprint-react
Installation
SKILL.md
Fingerprint — React
Integrate Fingerprint into a React app to identify visitors: initialize the agent once at startup,
then ask it for the visitor's visitor_id and a single-use event_id wherever you need it (on
load, or on an action like login or checkout).
Docs: https://docs.fingerprint.com/docs/react · JS Agent v4: https://docs.fingerprint.com/reference/js-agent-v4
Package
@fingerprint/react — install the latest version. (Preact uses the same package. For plain HTML
or an unsupported framework, use fingerprint-javascript and @fingerprint/agent instead.)
Env var
FINGERPRINT_PUBLIC_API_KEY— the public key, safe to ship to the browser.
Bundlers only expose prefixed vars to client code — map the key to the bundler's convention:
- Vite:
VITE_FINGERPRINT_PUBLIC_API_KEY→import.meta.env.VITE_...- Create React App:
REACT_APP_FINGERPRINT_PUBLIC_API_KEY→process.env.REACT_APP_...Never exposeFINGERPRINT_SECRET_API_KEYto the frontend.