@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 +21 -11
- package/dist/elu.js +1 -1
- package/dist/elu.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/storage.js.map +1 -1
- package/package.json +1 -1
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
|
|
84
|
-
|
|
|
85
|
-
| `api_host`
|
|
86
|
-
| `assets_host`
|
|
87
|
-
| `capture_pageview`
|
|
88
|
-
| `autocapture`
|
|
89
|
-
| `capture_exceptions`
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
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
|
-
##
|
|
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
|
|
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
|
|