Skip to content

Commit

Permalink
docs: added a code example with linking and tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
borislobanov92 committed Mar 12, 2024
1 parent 2692fc7 commit 4e7a82d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Fingerprint is a device intelligence platform offering 99.5% accurate visitor id
- [Requirements](#requirements)
- [Installation](#installation)
- [Getting started](#getting-started)
- [Linking and tagging information](#linking-and-tagging-information)
- [Caching strategy](#caching-strategy)
- [Error handling](#error-handling)
- [API Reference](#api-reference)
Expand Down Expand Up @@ -187,6 +188,29 @@ export default App;

See the full code example in the [examples folder](https://github.com/fingerprintjs/fingerprintjs-pro-react/tree/main/examples/create-react-app).

## 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 tags, see [Linking and tagging information](https://dev.fingerprint.com/docs/tagging-information).

Associate your data with a visitorId using the linkedId or tag parameter of the options that are passed into the `useVisitorData()` hook:
```jsx
// ...

function App() {
const {
isLoading,
error,
getData
} = useVisitorData({
linkedId: "user_1234",
tag: {
userAction: "login",
analyticsId: "UA-5555-1111-1"
}
});

// ...
```

## Caching strategy

Fingerprint Pro usage is billed per API call. To avoid unnecessary API calls, it is a good practice to cache identification results. By default, the SDK uses `sessionStorage` to cache results.
Expand Down

0 comments on commit 4e7a82d

Please sign in to comment.