JavaScript agent placement

The JS agent is a client-side JavaScript snippet that collects browser attributes and sends these signals to Fingerprint servers for processing and identification. Depending on your use case, placement of this script can range from all pages of your app to specific pages and events.

Fingerprint Pro billing is based on API usage (device identifications), so it is important to make the most of your subscription’s monthly API limit. We recommend calling the API only when the visitorId will be processed, saved, etc by your application.

📘

Using a JavaScript framework?

For JavaScript frameworks like React, Vue, and Angular, we recommend using our official framework-agnostic SPA wrapper. Learn more on GitHub.

The table below lists common use cases and recommended integration of the JavaScript agent.

Use CaseJS Agent PlacementAPI Call Event
Anonymous Visitor Identification - bulk information collection of anonymous visitorsLanding page, checkout page, etc.Page load
Account Takeover Prevention - prevent account theft from malicious login attemptsLogin page"Login" button click
Securing Login & Reducing Friction - reduce friction with conditional security checks at loginLogin page"Login" button click
Account Sharing Prevention - prevent users from sharing accountsLogin page"Login" button click
Form & Survey Abuse - protect forms from duplicate entriesForm page“Submit Form” button click
Coupon & Promo Abuse - protect profits from duplicate promotion abuseCheckout page“Apply coupon” button click
Credit Card Fraud - block users who repeatedly use faulty credit cardsCheckout page“Checkout” button click
E-commerce Tracking - track orders made by anonymous visitorsCheckout page“Checkout” button click
Paywall Circumvention - detect Incognito mode and prevent unlimited views of your paywalled contentPaywalled pagesPage load

📘

Device fingerprinting for native mobile apps

For mobile device identification, we highly recommend using our native SDKs for Android and iOS. For device identification that is scoped to the browser instance, a unique ID called visitorId is generated per browser. If a visitor switches to a different browser on the same device, a new visitorId is generated for that browser.