@elu-labs/analytics-browser 1.410.2 → 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
@@ -80,22 +80,30 @@ than creating one on every render or mount. The NPM client does not create
80
80
 
81
81
  ### Initialization options
82
82
 
83
- | Option | Default | Behavior |
84
- | --------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85
- | `api_host` | ELU Cloud | HTTPS origin for your instance's events, flags and replay. Site authority must permit the same endpoints. |
86
- | `assets_host` | Instance origin, or ELU Cloud assets for the Cloud ingest origin | Optional separate HTTPS origin for recorder assets. |
87
- | `capture_pageview` | `'history_change'` | Initial pageview plus History API and hash-route changes. `true` captures the initial pageview only; `false` disables automatic pageviews. |
88
- | `autocapture` | `true` | Enables automatic interaction capture, subject to site policy and consent. |
89
- | `capture_exceptions` | `false` | Set `true` for unhandled errors and promise rejections. Manual `captureException()` remains available. |
90
- | `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
- | `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. |
83
+ | Option | Default | Behavior |
84
+ | -------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
85
+ | `api_host` | ELU Cloud | HTTPS origin for your instance's events, flags and replay. Site authority must permit the same endpoints. |
86
+ | `assets_host` | Instance origin, or ELU Cloud assets for the Cloud ingest origin | Optional separate HTTPS origin for recorder assets. |
87
+ | `capture_pageview` | `'history_change'` | Initial pageview plus History API and hash-route changes. `true` captures the initial pageview only; `false` disables automatic pageviews. |
88
+ | `autocapture` | `true` | Enables automatic interaction capture, subject to site policy and consent. |
89
+ | `capture_exceptions` | `false` | Set `true` for unhandled errors and promise rejections. Manual `captureException()` remains available. |
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` | 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
+ | `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. |
92
93
 
93
94
  The script loader chooses its startup options; changing NPM options does not
94
95
  configure a script installation. Replay and privacy settings come from ELU.
95
96
  There is no public `startSessionRecording()`, `stopSessionRecording()`,
96
97
  `set_config()` or per-request endpoint override on this client.
97
98
 
98
- ## 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`.
99
107
 
100
108
  Performance sampling is off when neither your ELU site configuration nor local
101
109
  initialization options enable it. For the NPM client, you can opt in explicitly:
@@ -112,7 +120,9 @@ const elu = createEluClient('YOUR_SITE_KEY', {
112
120
 
113
121
  The TypeScript options type is `PerformanceCaptureConfig`. Each local setting
114
122
  overrides its remote counterpart; `true` enables both metrics and `false`
115
- 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.
116
126
  If a renewed site configuration omits performance settings, previous remote
117
127
  opt-ins end; explicit local overrides still require valid capture authority.
118
128