Skip to content

Commit

Permalink
Merge pull request #143 from borislobanov92/docs/linking-and-tagging
Browse files Browse the repository at this point in the history
docs: added a code example with linking and tagging
  • Loading branch information
ilfa authored Mar 14, 2024
2 parents 2692fc7 + 951860c commit a301da9
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 `tag`, see [Linking and tagging information](https://dev.fingerprint.com/docs/tagging-information).

Associate your data with a visitor ID using the `linkedId` or `tag` parameter of the options object passed into the `useVisitorData()` hook or the `getData` function:
```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 a301da9

Please sign in to comment.