From Fingerprint Pro v3

Update from Fingerprint Pro version 3 to the latest version 3

Because Fingerprint Pro follows Semantic Versioning, no code changes are necessary when upgrading from version 3.X.X to the latest version of 3. You only need to increase the JS agent package version as specified in your code.

Please see the changelog to learn about the latest features.

CDN

This section is for installing JS agent without the use of NPM or Yarn.

If you use our CDN (fpcdn.io), no action is required because it always serves the latest version of JS agent.

jsDelivr

If you use the jsDelivr CDN, switch to our CDN:

<script>
- import('https://cdn.jsdelivr.net/npm/@fingerprintjs/[email protected]/+esm')
+ import('https://fpcdn.io/v3/<<browserToken>>')
    .then(FingerprintJS => FingerprintJS.load({
-     apiKey: '<<browserToken>>'
    }));
</script>
<script>
  const script = document.createElement('script');
- script.src = 'https://cdn.jsdelivr.net/npm/@fingerprintjs/[email protected]/dist/fp.min.js';
+ script.src = 'https://fpcdn.io/v3/<<browserToken>>/iife.min.js';
  
  // ...
  
  FingerprintJS.load({
-   apiKey: '<<browserToken>>'
  });
</script>
- <script src="https://cdn.jsdelivr.net/npm/@fingerprintjs/[email protected]/dist/fp.min.js"></script>
+ <script src="https://fpcdn.io/v3/<<browserToken>>/iife.min.js"></script>
  <script>
    FingerprintJS.load({
-     apiKey: '<<browserToken>>'
    });
  </script>
require(
- ['https://cdn.jsdelivr.net/npm/@fingerprintjs/[email protected]/dist/fp.umd.min.js'],
+ ['https://fpcdn.io/v3/<<browserToken>>/umd.min.js'],
  (FingerprintJS) => {
    FingerprintJS.load({
-     apiKey: '<<browserToken>>'
    })
  }
)

Put your public API keys into the script URL after /v3/. An example script URL where the key is public-key: https://fpcdn.io/v3/public-key.

If you use a Content Security Policy, add the https://fpcdn.io origin to the allowlist. See more details in the CSP guide.

Since the public API token is a part of the URL, you may remove the apiKey option from the load function.

NPM

This section is for using NPM or Yarn to install JS agent.

Run the following command in a terminal to install the latest version of JS agent:

npm install @fingerprintjs/fingerprintjs-pro
yarn add @fingerprintjs/fingerprintjs-pro

Did this page help you?