Skip to main content
Call the get() function to send identification requests to Fingerprint and get the browser’s visitor ID. If you are just getting started with Fingerprint, we recommend reading the following guides first:

get() options

linkedId

Required: no Default: undefined Type: string Constraint: the number of characters must not exceed 256
linkedId is a way of linking the current analysis event with a custom identifier. This will allow you to filter visit information when using the Server API.
// Making an API call
var orderId = 3936532456
fp.get({ linkedId: orderId })
// linkedId will be saved with this event and will be available to be queried later.
If the information stored in linkedId is not available on the client when the event happens, it is possible to set it through our Update Event Server API. To learn more about tag and linkedId use cases, see Linking and tagging information.

tag

Required: no Default: undefined Type: any simple value or an object (not arrays) Constraint: the size must not exceed 16KB
tag is a customer-provided value or an object that is saved with the identification event and returned back to you in a webhook message or Server API response. You can use tag to associate the visit event with other information you have about the visitor. You can use any simple value (string, number, boolean) or an object. An object is saved as provided. A simple value (for example 123) is returned wrapped in an object like this: { "tag": 123 }. Examples of using the tag option:
fp.get({ tag: 123 });
fp.get({ tag: "signup" });
fp.get({ tag: { id: "456", location: { city: "Atlanta", country: "US" }});
What comes back in a Webhook or Server API response:
{
  "visitor_id": "nTxJ28Gt4CegeAwdWELL",
  "tag": { "tag": 123 },
  // ...
}

{
  "visitor_id": "nTxJ28Gt4CegeAwdWELL",
  "tag": { "tag": "signup" },
  // ...
}

{
  "visitor_id": "nTxJ28Gt4CegeAwdWELL",
  "tag": {
    "id": "456",
    "location": {
      "city": "Atlanta",
      "country": "US"
    }
  }
  // ...
}
If the information stored in tag is not available on the client when the event happens, it is possible to set it through our Update Event Server API. To learn more about tag and linkedId use cases, see Linking and tagging information.

timeout

Required: no Default: 10000 Type: number
Client timeout controls the total time (both client-side and server-side) that any analysis event can run. It doesn’t include the time when the page is in the background (not visible) because the browser may suspend the analysis process during that time. By default, it’s 10 seconds. You can set the client-side timeout in milliseconds using the timeout option. Example usage:
// A timeout of 20 seconds
// An example of the client-side timeout handling
try {
  const result = await fp.get({ timeout: 20000 })
  // ...
} catch (error) {
  if (error.code === 'client_timeout') {
    console.log("A timeout of 20 seconds exceeded")
  }
}
Note that setting a low timeout (less than 2000ms) could increase identification failures on weaker devices with slower internet connections.

get() response

fp.get() returns a promise that resolves to a result object. The format summary
await fp.get()
// response:
{
  "event_id": "8nbmT18x79m54PQ0GvPq",
  "visitor_id": "2JGu1Z4d2J4IqiyzO3i4",
  "suspect_score": 10,
  "sealed_result": "<encrypted sealed result with event data>",
  "cache_hit": false
}

get() response fields

event_id

Required: yes Type: string
The request identifier is unique for every request. Use it to request information about a specific identification request from the Server API.

visitor_id

Required: yes Type: string
The browser identifier (or device identifier for mobile platforms) The field will contain an empty string if the visitor can’t be identified, for example, a search bot. If the identification product is disabled, a dummy value is used.

sealed_result

Required: yes Default: null Type: string (base64-encoded binary data)
See more details in the Sealed Client Results guide. The field is missing if Sealed Client Results are disabled or unavailable for other reasons.

cache_hit

Required: no Type: bool (base64-encoded binary data)
The value is included if the cache configuration was used during the start() call and returns
  • true if the get() response was retrieved form the cache.
  • false if the get() response came directly from the Fingerprint backend.

suspect_score

Required: no Type: number (integer)
Shows the Suspect Score value of the event if the workspace has Smart Signals enabled.