How to install
Add@fingerprint/svelte as a dependency to your application.
FingerprintProvider. You need to specify your public API key and other configuration options based on your chosen region and active integration.
Svelte
useVisitorData hook in your components to identify visitors.
Svelte
Documentation
You can find the full documentation in the official GitHub repository. The repository also contains example applications demonstrating the usage of the library.Migration guide for Svelte SDK v3.0.0
Version 3.0.0 of the Svelte SDK switches from JavaScript agent v3 to JavaScript agent v4. It also adds Svelte 5 support (thesvelte peer dependency is widened to ^4.0.0 || ^5.0.0).
- Install the new version of the package:
- Update the provider import and options.
sessionStorage caching to no caching by default, aligned with the underlying JavaScript agent v4 default. To preserve the previous behavior, explicitly configure caching in the provider options (see example below).
Update provider imports and usage
FpjsProvider to FingerprintProvider:
- Update
useVisitorDatacalls and result field names:
Update visitor data usage
requestId is now event_id, and visitorId is now visitor_id.