@picked/analytics 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 +28 -30
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @picked/analytics
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Tracks the events of the Picked client — experiences, steps, feature flags and commerce —
|
|
4
|
+
with Snowplow, so they reach your Picked analytics.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
instructions: [https://github.com/snowplow/igluctl](https://github.com/snowplow/igluctl).
|
|
7
|
-
|
|
8
|
-
Unzip the `igluctl` binary and place it in the `packages/analytics` directory.
|
|
9
|
-
|
|
10
|
-
You may need to update the `igluctl` binary permissions to make it executable:
|
|
6
|
+
## Install
|
|
11
7
|
|
|
12
8
|
```bash
|
|
13
|
-
|
|
9
|
+
npm install picked @picked/analytics
|
|
14
10
|
```
|
|
15
11
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
Use Snowplow Micro for testing schemas. Check the official documentation for installation
|
|
19
|
-
instructions: [https://github.com/snowplow-incubator/snowplow-micro](https://github.com/snowplow-incubator/snowplow-micro).
|
|
20
|
-
|
|
21
|
-
## Local development
|
|
12
|
+
## Usage
|
|
22
13
|
|
|
23
|
-
|
|
14
|
+
```typescript
|
|
15
|
+
import { createClient } from 'picked'
|
|
16
|
+
import { analyticsPlugin } from '@picked/analytics/plugins/analytics'
|
|
24
17
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Set `collectorUrl` to `http://localhost:9090` in the tracker options when loading analytics plugin.
|
|
18
|
+
export const picked = createClient({
|
|
19
|
+
projectId: 'your-project-id',
|
|
20
|
+
plugins: [analyticsPlugin({ trackerOptions: { deployment: { env: 'production' } } })],
|
|
21
|
+
})
|
|
22
|
+
```
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
The tracker takes the project ID from the client.
|
|
34
25
|
|
|
35
|
-
|
|
26
|
+
| Option | Description |
|
|
27
|
+
| ------------------------------- | ------------------------------------------------------------------------------------- |
|
|
28
|
+
| `trackerOptions.deployment.env` | Required. The environment of this deployment, such as `production`. |
|
|
29
|
+
| `trackerOptions.collectorUrl` | The Snowplow collector. Defaults to Picked's. |
|
|
30
|
+
| `trackerOptions.collectorPath` | The collector path, when your own origin proxies the collector. |
|
|
31
|
+
| `trackerOptions.track*` | Turn individual Snowplow trackers on or off, such as `trackErrors` and `trackVitals`. |
|
|
32
|
+
| `enableInteractionListeners` | Track clicks and other interactions: `true`, or a list of interaction names. |
|
|
33
|
+
| `enableDocumentListeners` | Track page visibility, online and offline, resize and unload events. |
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
## Docs
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
- **Web:** [Analytics events](https://docs.picked.app/reference/sdk/analytics-events)
|
|
38
|
+
- **Local:** `node_modules/picked/docs/reference/sdk/analytics-events.md`. The `picked` package carries every page under `node_modules/picked/docs/`.
|
|
39
|
+
- **CLI:** `npx picked docs read /reference/sdk/analytics-events`. `npx picked docs list [words]` lists the pages.
|
|
40
|
+
- **MCP:** call `read_picked_doc` with `{ "path": "/reference/sdk/analytics-events" }`; `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/analytics",
|
|
3
3
|
"description": "Picked Analytics",
|
|
4
|
-
"version": "0.0.101
|
|
4
|
+
"version": "0.0.101",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@snowplow/browser-plugin-button-click-tracking": "^4.10.0",
|
|
7
7
|
"@snowplow/browser-plugin-error-tracking": "^4.10.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"main": "./dist/cjs/index.js",
|
|
75
75
|
"module": "./dist/esm/index.js",
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@picked/client": "0.0.101
|
|
77
|
+
"@picked/client": "0.0.101",
|
|
78
78
|
"effector": "^23.4.4"
|
|
79
79
|
},
|
|
80
80
|
"private": false,
|