@picked/fingerprintjs 0.0.101-next.2 → 0.0.101-next.3

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.
Files changed (2) hide show
  1. package/README.md +25 -28
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,37 +1,34 @@
1
- # FingerprintJS
1
+ # @picked/fingerprintjs
2
2
 
3
- ## 🚀 Quick Start
3
+ Adds the FingerprintJS visitor ID to the Picked session, so analytics events carry it.
4
4
 
5
- `@picked/fingerprintjs` is a plugin that automatically adds the FingerprintJS visitor ID to the analytics session, if it exists.
5
+ ## Install
6
6
 
7
- When added to the `createClient` `plugins` array, it will attempt to read `window.FingerprintJS` and store the resolved visitor ID in the session store under an internal key. The plugin automatically polls for `window.FingerprintJS` for up to 10 seconds and saves the `visitorId` when available. See below for how to import and use it.
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
- ## Snowplow integration
13
+ ## Usage
10
14
 
11
- After the plugin is initialized via `createClient` (i.e. the plugin is included in the `plugins` array and the client is started), the FingerprintJS visitor ID will be automatically added to the Snowplow session event as the `fingerprintjs_visitor_id` field.
15
+ ```typescript
16
+ import { createClient } from 'picked'
17
+ import { fingerprintjsPlugin } from '@picked/fingerprintjs'
12
18
 
13
- ## Using the `fingerprintjsPlugin`
19
+ export const picked = createClient({
20
+ projectId: 'your-project-id',
21
+ plugins: [fingerprintjsPlugin()],
22
+ })
23
+ ```
14
24
 
15
- You should import the `fingerprintjsPlugin` from the package `@picked/fingerprintjs` and add it to the `plugins` array passed to `createClient`.
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
- Example usage:
29
+ ## Docs
18
30
 
19
- ```typescript
20
- import { createClient, fingerprintjsPlugin } from '@picked/fingerprintjs'
21
-
22
- function app() {
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-next.2",
4
+ "version": "0.0.101-next.3",
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-next.2"
48
+ "@picked/client": "0.0.101-next.3"
49
49
  },
50
50
  "private": false,
51
51
  "publishConfig": {