From FingerprintJS Open-Source v3

Update from FingerprintJS Open-Source version 3 to FingerprintJS Pro version 3

How to update from Fingerprintjs Open-Source to FingerprintJS Pro in 30 seconds:

  1. Sign up on dashboard.fingerprintjs.com/signup, create a free subscription, then get a public API key.

  2. Change the @fingerprintjs/fingerprintjs package to @fingerprintjs/fingerprintjs-pro:

    Run:
    npm remove @fingerprintjs/fingerprintjs
    npm install @fingerprintjs/fingerprintjs-pro
    
    And replace the package name in your JavaScript/TypeScript code:
    - import FingerprintJS from '@fingerprintjs/fingerprintjs'
    + import FingerprintJS from '@fingerprintjs/fingerprintjs-pro'
    
    Run:
    yarn remove @fingerprintjs/fingerprintjs
    yarn add @fingerprintjs/fingerprintjs-pro
    
    And replace the package name in your JavaScript/TypeScript code:
    - import FingerprintJS from '@fingerprintjs/fingerprintjs'
    + import FingerprintJS from '@fingerprintjs/fingerprintjs-pro'
    
    Change the script URL:
      <script>
    -   const fpPromise = import('https://openfpcdn.io/fingerprintjs/v3')
    +   const fpPromise = import('https://fpcdn.io/v3/<<browserToken>>')
          .then(FingerprintJS => FingerprintJS.load())
    
        // ...
      </script>
    
    Change the script URL:
      <script>
        // Initialize the agent at application startup.
        const fpPromise = new Promise((resolve, reject) => {
          const script = document.createElement('script');
          script.onload = resolve;
          script.onerror = reject;
          script.async = true;
    -     script.src = 'https://openfpcdn.io/fingerprintjs/v3/iife.min.js';
    +     script.src = 'https://fpcdn.io/v3/<<browserToken>>/iife.min.js';
          document.head.appendChild(script);
        })
          .then(() => FingerprintJS.load());
    
        // ...
      </script>
    
    Change the script URL:
    - <script src="https://openfpcdn.io/fingerprintjs/v3/iife.min.js"></script>
    + <script src="https://fpcdn.io/v3/<<browserToken>>/iife.min.js"></script>
      <script>
        // ...
      </script>
    
  3. Add the public API key to the FingerprintJS.load() configuration:

    - FingerprintJS.load()
    + FingerprintJS.load({ apiKey: '<<browserToken>>' })
    
    Put the key to the agent script URL:
    https://fpcdn.io/v3/YOUR_PUBLIC_KEY
    
    For example:
    https://fpcdn.io/v3/token
    https://fpcdn.io/v3/token/iife.min.js
    

That's it, the visitorId has pro-level accuracy of 99.5% now.


Did this page help you?