Skip to main content
Deprecated in v4In Fingerprint v4, the caching functionality from @fingerprintjs/fingerprintjs-pro-spa has been incorporated directly into the JavaScript agent. You no longer need this wrapper library.If you are using Fingerprint v3, see the v3 documentation.

Migration guide

Follow these steps to migrate from @fingerprintjs/fingerprintjs-pro-spa to the v4 JavaScript agent.

1. Update dependencies

Remove the SPA library and install the v4 agent:

2. Update imports and initialization

The v4 agent uses Fingerprint.start() instead of creating a FpjsClient instance and calling init().
SPA library to v4 agent

3. Update identification calls

Replace getVisitorData() with get().
getVisitorData to get
The v4 agent no longer supports extendedResult. Extended data like IP address and geolocation should be retrieved server-side using the Server API or Sealed Client Results.

4. Update cache configuration

The cache options have been renamed: The v4 agent also provides two convenient duration presets:
  • 'optimize-cost' — caches for 1 hour
  • 'aggressive' — caches for 12 hours (not recommended for fraud prevention)

5. Check for cached results

The cacheHit property is now cache_hit in the response:
cacheHit to cache_hit
For more details about the v4 JavaScript agent, see the JavaScript agent reference.