visitorId provided by Fingerprint Identification is especially useful when combined with information you already know about your users, for example, account IDs, order IDs, etc. You can follow user actions, track logged-in devices, and recognize malicious behavior.
| Use case | Description |
|---|---|
| Account Takeover Prevention | Link visitor ID to account username to prevent malicious login attempts. Require multi-factor authentication if an unfamiliar visitor ID is trying to log in. |
| Account Sharing Prevention | Link visitor ID to account username to prevent users from sharing accounts. Flag accounts that exceed a certain number of visitor IDs as suspected of account sharing. |
| Trial Abuse Prevention | Link visitor ID to account username to prevent multiple sign-ups from a single visitor. Flag visitor IDs that exceed a certain number of associated accounts as suspected of trial abuse. |
| Credit Card Fraud Prevention | Link visitor ID to hashed credit card numbers to prevent repeated use of faulty credit cards. Flag visitors that exceed a certain number of credit cards. |
- On your server, in your own database: Process visitor ID and metadata on your server and store them in your own database table. This approach is secure, durable, and recommended for most security use cases.
- On your client, during the identification event: Use the
linkedIdortagparameters to pass your metadata to the Fingerprint API when requesting the visitor ID. Fingerprint stores this data for 30 or 90+ days, depending on your plan. This method is recommended for use cases where spoofing and long-term storage are not a concern. - On your server, after the identification event: Update existing events by sending the
linkedIdortaginformation to the/eventsendpoint with a PUT request. This method allows for modifying event data after the initial identification, which is useful if the information was not available at the time of the client-side request. The updated data is stored the same way as the client-side parameters.
Linking information in your own database
On the client, use the Fingerprint JS Agent to get avisitorId and send it to your server for processing.
client/login.js
visitorId and save it to your database together with your internal ID or other metadata.
server/api/linking-data.js
Verifying the
visitorId involves calling our Server API to make sure it was recently generated by Fingerprint. See our Fingerprint Use Cases project for implementation examples.Using linkedId and tag on the client
Associate your data with a visitorId using the linkedId or tag parameter of the JS agent’s get() function.
client/identify.js
Event data
Updating linkedId and tag on the server
Associate linkedId or tag data with a visitorId using the /events endpoint of the Fingerprint Server API with a PUT request.
On the client, use the Fingerprint JS Agent to get a requestId and send it to your server.
client/order.js
requestId to make a PUT request to the /events endpoint of the Fingerprint Server API.
server/api/process-order.js
Event data
tag and linkedId are arbitrary pieces of information linked to a particular Fingerprint event for your own use.
What’s the difference between linkedID and tag?
linkedIdis a simple string identifier. Fingerprint indexes it so you can use it as a filter when retrieving the visit history of a specificvisitorIdvia the Server API. Objects, arrays, or non-string values passed tolinkedIdare converted to strings.tagaccepts any simple value or any JavaScript object smaller than 16KB. It cannot be used to filter visits but can store a large amount of structured data about your visitor.
Hashing linked or tagged information
Fingerprint Identification is often useful when your internal IDs are unavailable, for example, on a login or signup page. To avoid sending emails, phone numbers, or other sensitive information to Fingerprint, you can hash the information first and pass only the hash into thetag or linkedId.
Hashing explainedA hash function is a mathematical function that takes an input of arbitraty length and outputs a random-looking fixed-length representation of it. Hash functions are used to represent the original data in a more efficient and secure way.
- For the same input, a hash function always returns the same result.
- Any change in input leads to a different result (collisions are rare).
- Computing the original input from its hash is practically impossible.
Hashing information before passing it to `linkedId`