Skip to main content
The visitor ID 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. There are three ways to link visitor IDs with your own metadata:
  • 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 linkedId or tag parameters 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 linked_id or tags information to the /v4/events/:event_id endpoint with a PATCH 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 JavaScript agent to get a visitor ID and send it to your server for processing.
client/login.js
Inside the server endpoint, verify the authenticity of the visitor ID and save it to your database together with your internal ID or other metadata.
server/api/linking-data.js
Verifying the visitor ID involves calling our Server API to make sure it was recently generated by Fingerprint. See our Fingerprint Use Cases project for implementation examples.
This approach requires more setup but is more secure. You have full control over the data and can store it indefinitely.

Using linkedId and tag on the client

Associate your data with a visitor ID using the linkedId or tag parameter of the JavaScript agent’s get() function.
client/identify.js
Your information will be part of that identification event and available through Webhooks and Server API. You can use webhooks to automatically store the events in your own database indefinitely.
Event data

Updating linked_id and tags on the server

Associate linked_id or tags data with a visitor ID using the /v4/events/:event_id endpoint of the Fingerprint Server API with a PATCH request. On the client, use the Fingerprint JavaScript agent to get an event ID and send it to your server.
client/order.js
On the backend, use the event ID to make a PATCH request to the /v4/events/:event_id endpoint of the Fingerprint Server API.
server/api/process-order.js
Your information will be added to the event and available through the Dashboard and Server API.
Event data
Tagged or linked information has no influence on identification accuracy. Both tags and linked_id are arbitrary pieces of information linked to a particular Fingerprint event for your own use.

What’s the difference between linked ID and tag?

  • linked_id is a simple string identifier. Fingerprint indexes it so you can use it as a filter when retrieving the visit history of a specific visitor ID via the Server API. Objects, arrays, or non-string values passed to linked_id are converted to strings.
  • tag accepts 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.
Limitations

Spoofing

Defining linkedId and tag in the browser is vulnerable to tampering, as is all client-side code. More sophisticated attackers can spoof the linkedId or tag and send any arbitrary value to Fingerprint API. We don’t recommend relying on linked_id and tag for security use cases. Link visitor IDs to other metadata on your server instead.

Data storage

Fingerprint stores the visit history for a limited time (30 days for accounts, 90 or more for Enterprise). After that, the identification events and their linked_id and tags values will not be available through the Server API. If your use case requires long-term data storage, you can use webhooks to store the events in your database as they happen or link visitor IDs to your metadata on your server entirely.

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 the tag or linkedId.
Hashing explainedA hash function is a mathematical function that takes an input of arbitrary 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.
You can use the crypto browser API to hash sensitive information before sending it to Fingerprint:
Hashing information before passing it to `linkedId`
For example, you might want to reduce multiple signups from the same visitor ID. On submit, you can use the Server API to retrieve all email hashes recently linked to that visitor ID. Then flag or block the visitor ID if it exceeds a certain number of linked emails.