一键导入
fingerprint-svelte
Integrate Fingerprint device identification into a Svelte / SvelteKit app — initialize the agent and get the visitor's visitor_id and event_id.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Integrate Fingerprint device identification into a Svelte / SvelteKit app — initialize the agent and get the visitor's visitor_id and event_id.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | fingerprint-svelte |
| description | Integrate Fingerprint device identification into a Svelte / SvelteKit app — initialize the agent and get the visitor's visitor_id and event_id. |
Integrate Fingerprint into a Svelte / SvelteKit app to identify visitors: initialize the provider
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/svelte · JS Agent v4: https://docs.fingerprint.com/reference/js-agent-v4
@fingerprint/svelte — install the latest version. (For plain HTML or an unsupported framework,
use @fingerprint/agent instead.)
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 (plain Svelte):
VITE_FINGERPRINT_PUBLIC_API_KEY→import.meta.env.VITE_...- SvelteKit:
PUBLIC_FINGERPRINT_PUBLIC_API_KEY→import { PUBLIC_FINGERPRINT_PUBLIC_API_KEY } from '$env/static/public'OnlyPUBLIC_-prefixed vars reach the browser in SvelteKit. Never expose the secret key.
Install @fingerprint/svelte.
Initialize once at the app root. Wrap the app in FingerprintProvider, passing an options
object with the public key and region (us | eu | ap, matching the workspace). The Svelte
provider takes a single options prop. See snippets/Provider.svelte.
Get the identification where you need it. Use useVisitorData. For identify-on-demand pass
{ immediate: false } and call getData() on the action you care about; it returns
{ visitor_id, event_id, ... }. See snippets/CreateAccountForm.svelte.
Verify it works. Disable your ad blocker, run the dev server, trigger the call, and confirm
a visitor_id is logged in the browser console (or that the event appears on the dashboard
Events page).
us | eu | ap).isLoading / error states.@fingerprintjs/fingerprintjs-pro, FingerprintJS.load(), or scriptUrlPattern.Integrate Fingerprint device identification into an Angular app — initialize the agent and get the visitor's visitor_id and event_id.
Add Fingerprint to a fullstack Next.js (App Router) app — identify visitors in the browser with the React SDK and verify the event_id server-side with the node SDK in a Route Handler or Server Action.
Integrate the Fingerprint Server API into a Node/Express backend — fetch an event by event_id and read the verified identification and Smart Signals.
Protect the Fingerprint JS Agent (v4) against ad blockers and improve identification accuracy by routing it through a first-party custom subdomain or a proxy integration (Cloudflare, CloudFront, Azure, Nginx) using the v4 `endpoints` option. Use to maximize accuracy after basic identification works, or when requests to the default Fingerprint domain are being blocked.
Integrate the Fingerprint Server API into a Python backend (FastAPI / Django / Flask) — fetch an event by event_id and read the verified identification and Smart Signals.
Integrate Fingerprint device identification into a React (or Preact) app — initialize the agent and get the visitor's visitor_id and event_id.