Skip to content

Commit 30ffade

Browse files
yosriadyclaude
andcommitted
Document tracking.excludeQueryParams for the Web SDK
Add an "Excluding query parameters" section covering the opt-in string[] denylist, the always-on privy_oauth_* defaults, and which captured fields are redacted. Uses the FormoAnalyticsProvider snippet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7c76378 commit 30ffade

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

sdks/web.mdx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,38 @@ const analytics = await FormoAnalytics.init('your-write-key', {
598598

599599
Specify exact hostnames and exact paths in exclusion lists.
600600

601+
### Excluding query parameters
602+
603+
Formo automatically captures the page URL, query string, individual query-parameter properties, and the referrer.
604+
605+
If your URLs carry sensitive data (auth tokens, one-time codes, emails), use `tracking.excludeQueryParams` to strip those parameters in the browser, before any event is sent so they are never transmitted or stored:
606+
607+
```tsx
608+
<FormoAnalyticsProvider
609+
writeKey="<YOUR_WRITE_KEY>"
610+
options={{
611+
tracking: {
612+
excludeQueryParams: ["token", "access_token", "email", "signature"],
613+
},
614+
}}
615+
>
616+
{children}
617+
</FormoAnalyticsProvider>
618+
```
619+
620+
| Option | Type | Default | Description |
621+
|--------|------|---------|-------------|
622+
| `excludeQueryParams` | `string[]` | `[]` | Query parameter names to strip from captured URLs before any event is sent. Applied on top of an always-on built-in denylist that cannot be disabled. |
623+
624+
The following parameters are **always** stripped, regardless of configuration:
625+
626+
- `privy_oauth_code` — Privy OAuth authorization code
627+
- `privy_oauth_state` — Privy OAuth CSRF state token
628+
- `privy_oauth_provider` — Privy OAuth provider identifier
629+
630+
Excluded parameters are removed from the `url`, `query`, `referrer`, and other event properties. Matching is case-insensitive.
631+
632+
601633
### Consent management
602634

603635
The Formo Web SDK includes simplified consent management functionality to help you comply with privacy regulations like GDPR, CCPA, and ePrivacy Directive.
@@ -996,4 +1028,4 @@ To verify the proxy is working:
9961028
- Visit your website / app
9971029
- Open the network tab in your browser's developer tools
9981030
- Check that analytics requests are going through your domain instead of `events.formo.so`
999-
- Check that events show up in the Activity page on the Formo dashboard
1031+
- Check that events show up in the Activity page on the Formo dashboard

0 commit comments

Comments
 (0)