@elu-labs/analytics-browser 1.410.3 → 1.410.4

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 CHANGED
@@ -88,7 +88,7 @@ than creating one on every render or mount. The NPM client does not create
88
88
  | `autocapture` | `true` | Enables automatic interaction capture, subject to site policy and consent. |
89
89
  | `capture_exceptions` | `false` | Set `true` for unhandled errors and promise rejections. Manual `captureException()` remains available. |
90
90
  | `capture_network_requests` | `true` | Set `false` to stop reporting fetch/XHR requests. Each report carries method, status, timing and a scrubbed path only — never query strings, headers or bodies. Up to 200 per page. |
91
- | `capture_performance` | Off unless enabled in ELU | `true` enables memory and long-task samples; `false` disables both. An object overrides individual settings; see below. |
91
+ | `capture_performance` | Web Vitals on; samples off unless enabled in ELU | `false` disables Web Vitals and the memory and long-task samples; `true` enables the samples. An object sets `web_vitals`, `memory`, `long_tasks` individually; see below. |
92
92
  | `loaded(client)` | None | Runs after local startup and before the initial automatic pageview. It does not mean configuration, flags or delivery have completed. An async callback is not awaited. |
93
93
 
94
94
  The script loader chooses its startup options; changing NPM options does not
@@ -96,7 +96,14 @@ configure a script installation. Replay and privacy settings come from ELU.
96
96
  There is no public `startSessionRecording()`, `stopSessionRecording()`,
97
97
  `set_config()` or per-request endpoint override on this client.
98
98
 
99
- ## Optional performance samples
99
+ ## Web Vitals and optional performance samples
100
+
101
+ Each page reports its Core Web Vitals (LCP, FCP, CLS and INP) as one or more
102
+ `$web_vitals` events carrying the values, their ratings and the page location
103
+ only. Metrics that settle early are sent together after a short delay; the rest
104
+ are sent once the page is hidden. A page that first paints while hidden reports
105
+ no paint timings. Pass `capture_performance: { web_vitals: false }` to turn this
106
+ off; `web_vitals` stays on only when omitted or `true`.
100
107
 
101
108
  Performance sampling is off when neither your ELU site configuration nor local
102
109
  initialization options enable it. For the NPM client, you can opt in explicitly:
@@ -113,7 +120,9 @@ const elu = createEluClient('YOUR_SITE_KEY', {
113
120
 
114
121
  The TypeScript options type is `PerformanceCaptureConfig`. Each local setting
115
122
  overrides its remote counterpart; `true` enables both metrics and `false`
116
- disables both. The interval defaults to 30 seconds, with a five-second minimum.
123
+ disables both, along with Web Vitals. A `capture_performance` value that is
124
+ neither a boolean nor an object is treated as `false`. The interval defaults to
125
+ 30 seconds, with a five-second minimum.
117
126
  If a renewed site configuration omits performance settings, previous remote
118
127
  opt-ins end; explicit local overrides still require valid capture authority.
119
128