Skip to content

Commit

Permalink
Merge pull request #62 from fingerprintjs/docs/add-linking-section-to…
Browse files Browse the repository at this point in the history
…-readme

docs(README): add tag and linkedId section INTER-586
  • Loading branch information
JuroUhlar authored May 23, 2024
2 parents 54663e6 + 9fa0e9b commit 4d4af09
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,25 @@ To get your API key and get started, see the [Quick start guide in our documenta

See the full code in the provided [example applications](./examples).

## Linking and tagging information

The `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. To learn more about various applications of the `linkedId` and `tag`, see [Linking and tagging information](https://dev.fingerprint.com/docs/tagging-information).

Associate the visitor ID with your data using the `linkedId` or `tag` parameter of the options object passed into the `useVisitorData()` hook:

```html
<script>
import { useVisitorData } from '@fingerprintjs/fingerprintjs-pro-svelte';
const { getData, data, isLoading, error } = useVisitorData({
linkedId: 'user_1234',
tag: {
userAction: 'login',
analyticsId: 'UA-5555-1111-1',
},
});
</script>
```

## Caching strategy

Fingerprint Pro usage is billed per API call. To avoid unnecessary API calls, it is a good practice to [cache identification results](https://dev.fingerprint.com/docs/caching-visitor-information). By default, the SDK uses `sessionStorage` to cache results.
Expand Down

0 comments on commit 4d4af09

Please sign in to comment.