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
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
+
exportdefaultdefineNuxtConfig({
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
+
55
79
### Custom Paths
56
80
57
81
Customize the proxy endpoint paths:
@@ -83,15 +107,15 @@ useScriptGoogleAnalytics({
83
107
84
108
First-party mode supports the following scripts:
85
109
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`|
89
113
| 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`|
91
115
| TikTok Pixel |`analytics.tiktok.com`|
92
116
| 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`|
Copy file name to clipboardExpand all lines: docs/content/scripts/marketing/hotjar.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,9 +117,9 @@ This script supports [First-Party Mode](/docs/guides/first-party) which routes a
117
117
118
118
When enabled globally via `scripts.firstParty: true`, this script will:
119
119
- 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
123
123
124
124
::callout{type="info"}
125
125
Hotjar uses WebSocket connections for session recording data. The proxy handles initial setup, but WebSocket connections go directly to Hotjar servers.
0 commit comments