fingerprintjs-pro-spa open-source library is a framework-agnostic wrapper over the Fingerprint JS Agent with a built-in caching mechanism. It is used by our other frontend libraries under the hood.
Installation
Install using your favorite package manager:Create the client
Create aFpjsClient instance before rendering or initializing your application. You should only have one instance of the client. You need to specify your public API key and other configuration options based on your chosen region and active integration.
JavaScript
Initialise the JS agent
Before you start making identification requests to the Fingerprint API, you need to initialize the Agentto allow it to gather browser signals.
Make sure the initialization has been completed before calling the
getVisitorData method to avoid errors.
JavaScript
Call the Fingerprint API
ThegetVisitorData method returns visitor identification data based on the request options.The second parameter
ignoreCache will make sure that a request to the API is made even if the data is present in the cache.
JavaScript