@vidinfra/analytics 1.1.1 → 1.1.2

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 +13 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -69,6 +69,18 @@ initTracking({
69
69
  });
70
70
  ```
71
71
 
72
+ ### Library-scoped tracking
73
+
74
+ To scope analytics data to a specific video library, pass `library_id` as a query parameter in the tracking URL:
75
+
76
+ ```typescript
77
+ initTracking({
78
+ trackingUrl: `https://<organization>.analytics.tenbyte.com/tracking/v1/<project-id>/<platform-id>?library_id=<library-id>`,
79
+ });
80
+ ```
81
+
82
+ Query parameters in the tracking URL are preserved and forwarded to all ping and event requests.
83
+
72
84
  ### Media Tracking
73
85
 
74
86
  ```typescript
@@ -109,7 +121,7 @@ export function YourPlayer({ video }: Props) {
109
121
 
110
122
  | Option | Type | Default | Description |
111
123
  | ---------------------- | ---------- | ------- | ------------------------------------------------ |
112
- | `trackingUrl` | `string` | — | **Required.** Your analytics endpoint URL. |
124
+ | `trackingUrl` | `string` | — | **Required.** Your analytics endpoint URL. Supports query parameters (e.g. `?library_id=xxx`). |
113
125
  | `hashMode` | `boolean` | `false` | Use hash-based routing for page tracking. |
114
126
  | `trackPage` | `boolean` | `true` | Enable page view tracking. |
115
127
  | `trackMedia` | `boolean` | `true` | Enable media playback tracking. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidinfra/analytics",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "The web client for Vidinfra Analytics",
5
5
  "type": "module",
6
6
  "exports": {