Skip to content

Commit 0485d59

Browse files
committed
chore: missed files
1 parent 3bc816e commit 0485d59

File tree

14 files changed

+56
-32
lines changed

14 files changed

+56
-32
lines changed

docs/content/docs/1.guides/2.first-party.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ When third-party scripts load directly from external servers, they expose your u
1616

1717
First-party mode routes all script traffic through your domain:
1818

19-
- **User IPs stay private** - Third parties see your server's IP, not your users'
19+
- **User IPs anonymized** - IPs are anonymized to subnet level before forwarding; third parties can't identify individual users
20+
- **Device fingerprinting reduced** - Screen resolution, User-Agent, and hardware info are generalized to common buckets
2021
- **No third-party cookies** - Requests are same-origin, eliminating cross-site tracking
2122
- **Works with ad blockers** - Requests appear first-party
2223
- **Faster loads** - No extra DNS lookups for external domains
@@ -52,6 +53,29 @@ export default defineNuxtConfig({
5253
})
5354
```
5455

56+
### Privacy Modes
57+
58+
First-party mode supports two privacy levels via the `privacy` option:
59+
60+
| Mode | Description |
61+
|------|-------------|
62+
| `'anonymize'` (default) | Anonymizes IP addresses to subnet level, generalizes screen resolution and hardware info to common buckets, normalizes User-Agent to browser family + major version. Analytics IDs are preserved so tracking still works. |
63+
| `'proxy'` | Forwards requests as-is through your server. Strips sensitive headers (cookies, authorization) but doesn't modify analytics payloads. Privacy comes from third parties seeing your server's IP instead of the user's. |
64+
65+
```ts [nuxt.config.ts]
66+
export default defineNuxtConfig({
67+
scripts: {
68+
firstParty: {
69+
privacy: 'proxy', // or 'anonymize' (default)
70+
}
71+
}
72+
})
73+
```
74+
75+
::callout{type="info"}
76+
In `anonymize` mode, fingerprinting data is **generalized** rather than stripped — analytics endpoints still receive valid data, just with reduced precision. For example, screen resolution `1440x900` becomes `1920x1080` (desktop bucket), and User-Agent is normalized to `Mozilla/5.0 (compatible; Chrome/131.0)`.
77+
::
78+
5579
### Custom Paths
5680

5781
Customize the proxy endpoint paths:
@@ -83,15 +107,15 @@ useScriptGoogleAnalytics({
83107

84108
First-party mode supports the following scripts:
85109

86-
| Script | Endpoints Routed |
87-
|--------|------------------|
88-
| Google Analytics | `www.google.com/g/collect`, `www.google-analytics.com` |
110+
| Script | Endpoints Proxied |
111+
|--------|-------------------|
112+
| Google Analytics | `google-analytics.com`, `analytics.google.com`, `stats.g.doubleclick.net`, `pagead2.googlesyndication.com` |
89113
| Google Tag Manager | `www.googletagmanager.com` |
90-
| Meta Pixel | `connect.facebook.net`, `www.facebook.com/tr` |
114+
| Meta Pixel | `connect.facebook.net`, `www.facebook.com/tr`, `pixel.facebook.com` |
91115
| TikTok Pixel | `analytics.tiktok.com` |
92116
| Segment | `api.segment.io`, `cdn.segment.com` |
93-
| Microsoft Clarity | `www.clarity.ms` |
94-
| Hotjar | `static.hotjar.com`, `vars.hotjar.com` |
117+
| Microsoft Clarity | `www.clarity.ms`, `scripts.clarity.ms`, `d.clarity.ms`, `e.clarity.ms` |
118+
| Hotjar | `static.hotjar.com`, `script.hotjar.com`, `vars.hotjar.com`, `in.hotjar.com` |
95119
| X/Twitter Pixel | `analytics.twitter.com`, `t.co` |
96120
| Snapchat Pixel | `tr.snapchat.com` |
97121
| Reddit Pixel | `alb.reddit.com` |

docs/content/scripts/analytics/google-analytics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
192192
When enabled globally via `scripts.firstParty: true`, this script will:
193193
- Load from your domain instead of third-party servers
194194
- Route collection requests (`/g/collect`) through your server
195-
- Hide user IP addresses from Google
196-
- Strip fingerprinting parameters (`sr`, `vp`, `sd`, `ul`)
195+
- Anonymize user IP addresses to subnet level
196+
- Generalize device fingerprinting data (`sr`, `vp`, `ul`) to common buckets
197197

198198
```ts [nuxt.config.ts]
199199
export default defineNuxtConfig({

docs/content/scripts/marketing/clarity.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
131131

132132
When enabled globally via `scripts.firstParty: true`, this script will:
133133
- Load from your domain instead of `www.clarity.ms`
134-
- Route data/event collection through your server
135-
- Hide user IP addresses from Microsoft
136-
- Strip fingerprinting parameters from session data
134+
- Route data/event collection (`d.clarity.ms`, `e.clarity.ms`) through your server
135+
- Anonymize user IP addresses to subnet level
136+
- Generalize device fingerprinting data to common buckets
137137

138138
```ts [nuxt.config.ts]
139139
export default defineNuxtConfig({

docs/content/scripts/marketing/hotjar.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
117117

118118
When enabled globally via `scripts.firstParty: true`, this script will:
119119
- Load from your domain instead of `static.hotjar.com`
120-
- Route configuration and data requests through your server
121-
- Hide user IP addresses from Hotjar
122-
- Strip device fingerprinting parameters
120+
- Route configuration and data requests (`vars.hotjar.com`, `in.hotjar.com`) through your server
121+
- Anonymize user IP addresses to subnet level
122+
- Generalize device fingerprinting data to common buckets
123123

124124
::callout{type="info"}
125125
Hotjar uses WebSocket connections for session recording data. The proxy handles initial setup, but WebSocket connections go directly to Hotjar servers.

docs/content/scripts/tracking/google-tag-manager.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
265265
When enabled globally via `scripts.firstParty: true`, this script will:
266266
- Load from your domain instead of `www.googletagmanager.com`
267267
- Route all GTM requests through your server
268-
- Hide user IP addresses from Google
269-
- Strip fingerprinting parameters
268+
- Anonymize user IP addresses to subnet level
269+
- Generalize device fingerprinting data to common buckets
270270

271271
```ts [nuxt.config.ts]
272272
export default defineNuxtConfig({

docs/content/scripts/tracking/meta-pixel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
154154
When enabled globally via `scripts.firstParty: true`, this script will:
155155
- Load from your domain instead of `connect.facebook.net`
156156
- Route tracking requests (`/tr`) through your server
157-
- Hide user IP addresses from Meta
158-
- Strip fingerprinting parameters (`ud`, `fbp`, `fbc`, `external_id`)
157+
- Anonymize user IP addresses to subnet level
158+
- Generalize device fingerprinting data to common buckets
159159

160160
```ts [nuxt.config.ts]
161161
export default defineNuxtConfig({

docs/content/scripts/tracking/reddit-pixel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
123123
When enabled globally via `scripts.firstParty: true`, this script will:
124124
- Load from your domain instead of `alb.reddit.com`
125125
- Route tracking requests through your server
126-
- Hide user IP addresses from Reddit
127-
- Strip fingerprinting parameters
126+
- Anonymize user IP addresses to subnet level
127+
- Generalize device fingerprinting data to common buckets
128128

129129
```ts [nuxt.config.ts]
130130
export default defineNuxtConfig({

docs/content/scripts/tracking/segment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
125125
When enabled globally via `scripts.firstParty: true`, this script will:
126126
- Load from your domain instead of `cdn.segment.com`
127127
- Route API requests (`api.segment.io`) through your server
128-
- Hide user IP addresses from Segment
129-
- Strip fingerprinting parameters (`anonymousId`, `context.ip`, `context.userAgent`)
128+
- Anonymize user IP addresses to subnet level
129+
- Normalize User-Agent and generalize device fingerprinting data to common buckets
130130

131131
```ts [nuxt.config.ts]
132132
export default defineNuxtConfig({

docs/content/scripts/tracking/snapchat-pixel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
181181
When enabled globally via `scripts.firstParty: true`, this script will:
182182
- Load from your domain instead of `tr.snapchat.com`
183183
- Route tracking requests through your server
184-
- Hide user IP addresses from Snapchat
185-
- Strip fingerprinting parameters (`d_a`, `d_ot`, `d_os`, `d_bvs`, screen dimensions)
184+
- Anonymize user IP addresses to subnet level
185+
- Generalize device fingerprinting data (`d_os`, `d_bvs`, screen dimensions) to common buckets
186186

187187
```ts [nuxt.config.ts]
188188
export default defineNuxtConfig({

docs/content/scripts/tracking/tiktok-pixel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
140140
When enabled globally via `scripts.firstParty: true`, this script will:
141141
- Load from your domain instead of `analytics.tiktok.com`
142142
- Route tracking requests through your server
143-
- Hide user IP addresses from TikTok
144-
- Strip fingerprinting parameters
143+
- Anonymize user IP addresses to subnet level
144+
- Generalize device fingerprinting data to common buckets
145145

146146
```ts [nuxt.config.ts]
147147
export default defineNuxtConfig({

0 commit comments

Comments
 (0)