@picked/fingerprintjs 0.0.101-next.2 → 0.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -28
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @picked/fingerprintjs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Adds the FingerprintJS visitor ID to the Picked session, so analytics events carry it.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install picked @picked/fingerprintjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Load FingerprintJS on the page yourself; this package does not include it.
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## Usage
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
```typescript
|
|
16
|
+
import { createClient } from 'picked'
|
|
17
|
+
import { fingerprintjsPlugin } from '@picked/fingerprintjs'
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
export const picked = createClient({
|
|
20
|
+
projectId: 'your-project-id',
|
|
21
|
+
plugins: [fingerprintjsPlugin()],
|
|
22
|
+
})
|
|
23
|
+
```
|
|
14
24
|
|
|
15
|
-
|
|
25
|
+
The plugin waits up to 10 seconds for `window.FingerprintJS`, then stores its `visitorId` as
|
|
26
|
+
the `fingerprintjs_visitor_id` session identifier. Analytics events send it in their
|
|
27
|
+
`session` context. It does nothing outside a browser.
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
## Docs
|
|
18
30
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
try {
|
|
24
|
-
const plugins: CreateClientOptions['plugins'] = [fingerprintjsPlugin()]
|
|
25
|
-
|
|
26
|
-
const client = createClient({
|
|
27
|
-
projectId: 'project-id',
|
|
28
|
-
predicates: {},
|
|
29
|
-
plugins,
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
client.start()
|
|
33
|
-
} catch (error) {
|
|
34
|
-
throw error
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
31
|
+
- **Web:** [FingerprintJS](https://docs.picked.app/reference/sdk/plugins/fingerprintjs)
|
|
32
|
+
- **Local:** `node_modules/picked/docs/reference/sdk/plugins/fingerprintjs.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
|
|
33
|
+
- **CLI:** `npx picked docs read /reference/sdk/plugins/fingerprintjs`. `npx picked docs list [words]` lists the pages.
|
|
34
|
+
- **MCP:** call `read_picked_doc` with `{ "path": "/reference/sdk/plugins/fingerprintjs" }`; `list_picked_docs` lists the pages. Add the server with `claude mcp add --transport http picked https://api.picked.app/mcp`, or see [How to connect the MCP server](https://docs.picked.app/how-to/connect-the-mcp-server) for other tools.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/fingerprintjs",
|
|
3
3
|
"description": "Fingerprintjs plugin",
|
|
4
|
-
"version": "0.0.101
|
|
4
|
+
"version": "0.0.101",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@picked/client": "workspace:*",
|
|
7
7
|
"@repo/eslint-config": "workspace:*",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"main": "./dist/cjs/index.js",
|
|
46
46
|
"module": "./dist/esm/index.js",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@picked/client": "0.0.101
|
|
48
|
+
"@picked/client": "0.0.101"
|
|
49
49
|
},
|
|
50
50
|
"private": false,
|
|
51
51
|
"publishConfig": {
|