You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/scripts/analytics/rybbit-analytics.md
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -141,22 +141,34 @@ You must provide the options when setting up the script for the first time.
141
141
```ts
142
142
exportconst RybbitAnalyticsOptions =object({
143
143
siteId: union([string(), number()]), // required
144
+
autoTrackPageview: optional(boolean()),
144
145
trackSpa: optional(boolean()),
145
146
trackQuery: optional(boolean()),
147
+
trackOutbound: optional(boolean()),
148
+
trackErrors: optional(boolean()),
149
+
sessionReplay: optional(boolean()),
150
+
webVitals: optional(boolean()),
146
151
skipPatterns: optional(array(string())),
147
152
maskPatterns: optional(array(string())),
148
-
debounce: optional(number())
153
+
debounce: optional(number()),
154
+
apiKey: optional(string()),
149
155
})
150
156
```
151
157
152
158
#### Configuration Options
153
159
154
160
-`siteId` (required): Your Rybbit Analytics site ID
161
+
`autoTrackPageview`: Set to `false` to disable automatic tracking of the initial pageview when the script loads. You will need to manually call the pageview function to track pageviews. Default: `true`
155
162
-`trackSpa`: Set to `false` to disable automatic pageview tracking for single page applications
156
163
-`trackQuery`: Set to `false` to disable tracking of URL query strings
164
+
-`trackOutbound`: Set to `false` to disable automatic tracking of outbound link clicks. Default: `true`
165
+
-`trackErrors`: Set to `true` to enable automatic tracking of JavaScript errors and unhandled promise rejections. Only tracks errors from the same origin to avoid noise from third-party scripts. Default: `false`
166
+
-`sessionReplay`: Set to `true` to enable session replay recording. Captures user interactions, mouse movements, and DOM changes for debugging and user experience analysis. Default: `false`
167
+
-`webVitals`: Set to `true` to enable Web Vitals performance metrics collection (LCP, CLS, INP, FCP, TTFB). Web Vitals are disabled by default to reduce script size and network requests. Default: `false`
157
168
-`skipPatterns`: Array of URL path patterns to ignore
158
169
-`maskPatterns`: Array of URL path patterns to mask for privacy
159
170
-`debounce`: Delay in milliseconds before tracking a pageview after URL changes
171
+
-`apiKey`: API key for tracking from localhost during development. Bypasses origin validation for self-hosted Rybbit Analytics instances
0 commit comments