---
title: "Proxy Third-Party Scripts Through Your Nuxt Server · Nuxt Scripts"
description: "Serve third-party scripts from your own domain in Nuxt. First-party mode bundles supported SDKs, proxies their requests, and anonymizes data before forwarding it."
canonical_url: "https://scripts.nuxt.com/docs/guides/first-party"
meta:
  "og:description": "Serve third-party scripts from your own domain in Nuxt. First-party mode bundles supported SDKs, proxies their requests, and anonymizes data before forwarding it."
  "og:image": "https://scripts.nuxt.com/_og/s/o_580ea6ded83ce6c6.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Proxy Third-Party Scripts Through Your Nuxt Server · Nuxt Scripts"
  "twitter:image": "https://scripts.nuxt.com/_og/s/o_580ea6ded83ce6c6.png"
---

> Index of every page on this site: [llms.txt](https://scripts.nuxt.com/llms.txt)

**Guides**

# **First-Party Mode: Privacy-Focused Proxy**

[Copy for LLMs](https://scripts.nuxt.com/docs/guides/first-party.md)

## Why Proxy Third-Party Scripts?

Third-party requests connect your visitors' browsers directly to vendor servers, exposing IP addresses and browser signals that can contribute to a [**fingerprint**](https://developer.mozilla.org/en-US/docs/Glossary/Fingerprinting). The current [**Nuxt Scripts audit snapshot**](https://github.com/nuxt/scripts/blob/main/packages/script/src/script-sizes.json) shows why counting script tags is not enough: integrations can set several cookies, contact multiple domains, and inspect device data after their loader runs.

Ad blockers can stop these requests, leaving gaps in analytics that depend on them.

## How First-Party Mode Works

For supported registry scripts, first-party mode can bundle the SDK, proxy its runtime requests, and anonymize data before forwarding it. Each registry definition declares which of these capabilities the script supports.

### Bundling

During `**nuxt build**`, the module downloads third-party scripts and saves them as local assets at `**/_scripts/assets/[hash].js**`. At runtime, your server (or CDN) serves these files from your own domain instead of the original third-party CDN.

The initial request no longer reaches the original host or pays its [**DNS and connection setup costs**](https://developer.mozilla.org/en-US/docs/Web/Performance/Guides/dns-prefetch). Content-addressed filenames also let browsers cache bundled scripts long term.

### Reverse Proxy

Runtime requests (analytics beacons, pixel fires, tracking calls) are intercepted and forwarded through Nitro server routes at `**/_scripts/p/**`. The module routes requests through source rewriting, runtime wrappers, or SDK endpoint configuration:

1. **AST rewriting** at build time: third-party domains in the bundled script source are replaced with your proxy path
2. **Runtime wrappers** on the client: bundled SDKs use Nuxt Scripts wrappers for dynamically constructed URLs.
3. **SDK endpoint configuration**: Google Analytics and PostHog receive a collection endpoint on your server. Their SDKs send events there without source rewriting.

Supported script and collection requests use same-origin URLs, so cookies set on those responses are not [**third-party cookies**](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Third-party_cookies). Host-based blocking rules are less likely to match them, although path-based or behavioral rules can still block requests.

### Anonymization

By default, the proxy anonymizes IP addresses to subnet level and removes sensitive headers such as cookies and auth tokens before forwarding a request. Each script's privacy tier determines whether it also changes the user agent, screen dimensions, and hardware fingerprints.

Even with minimal anonymization, requests routed through the reverse proxy appear same-origin and do not expose the browser's direct connection to the upstream service.

The privacy transformer deliberately preserves analytics identifiers and user data fields such as `**uid**`, `**cid**`, `**email**`, and `**phone**`; SDKs may hash some of those values before sending them. First-party mode reduces selected network and fingerprinting data. It does not make an identified analytics payload anonymous.

## Usage

Registry scripts use their supported first-party capabilities by default. Adding an entry prepares its proxy routes, bundled assets, types, and composables without loading the script:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      // Infrastructure only; use composables to load on specific pages
      googleAnalytics: { id: 'G-XXXXXX' },
      metaPixel: { id: '123456' },

      // Infrastructure + global auto-load
      plausibleAnalytics: { scriptId: 'YOUR_SCRIPT_ID', trigger: 'onNuxtReady' },
    }
  }
})
```

Scripts without `**trigger**` are infrastructure only: the module prepares any supported infrastructure for that script (proxy routes, bundling, composables), but the script only loads when you call the composable in a component. Add `**trigger**` to auto-load globally.

## Privacy Tiers

Each proxied script has a default privacy tier chosen around the data its SDK needs:

| **Tier** | **What's anonymized** | **Scripts** |
| --- | --- | --- |
| **Full** | IP, user agent, language, screen, timezone, hardware fingerprints | Meta Pixel, X Pixel, Snapchat Pixel, Reddit Pixel, LinkedIn Insight Tag |
| **Heatmap-safe** | IP, language, hardware fingerprints (preserves screen and user agent for session replay) | Google Analytics, Google AdSense, Microsoft Clarity, Hotjar |
| **IP only** | IP addresses anonymized to subnet level | Plausible, PostHog, Umami, Cloudflare Web Analytics, Vercel Analytics, Rybbit, Databuddy, Matomo, Ahrefs Web Analytics, Intercom, YouTube, Vimeo, Gravatar, Calendly |

Sensitive headers (`**cookie**`, `**authorization**`) are **always** stripped regardless of tier.

### Six Privacy Flags

Each tier selects from six privacy flags. The [**privacy transformer source**](https://github.com/nuxt/scripts/blob/main/packages/script/src/runtime/server/utils/privacy.ts) defines the exact header, query, and payload fields each flag changes:

| **Flag** | **What it does** |
| --- | --- |
| `**ip**` | Anonymizes IP addresses to subnet level in headers and payload params |
| `**userAgent**` | Normalizes User-Agent to browser family + major version (e.g. `**Mozilla/5.0 (compatible; Chrome/131.0)**`) |
| `**language**` | Normalizes Accept-Language to primary language tag |
| `**screen**` | Generalizes screen resolution, viewport, hardware concurrency, and device memory to common buckets |
| `**timezone**` | Generalizes timezone offset and IANA timezone names |
| `**hardware**` | Anonymizes canvas/webgl/audio fingerprints, plugin/font lists, browser versions, and device info |

### Tier Flag Matrix

| **Flag** | **IP Only** | **Heatmap-safe** | **Full** |
| --- | --- | --- | --- |
| `**ip**` |  |  | |
| `**userAgent**` |  |  | |
| `**language**` |  |  | |
| `**screen**` |  |  | |
| `**timezone**` |  |  | |
| `**hardware**` |  |  | |

**IP Only** zeroes the final IPv4 octet (/24) or keeps the first 48 bits of an IPv6 address. This reduces precision but does not guarantee a particular geolocation accuracy. **Heatmap-safe** normalizes language and hardware fingerprint data while preserving user agent and screen dimensions used by session replay tools. **Full** applies all six privacy transforms.

### Global Override

Use the top-level `**privacy**` option to replace the defaults for every proxied script:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    privacy: true, // Full anonymization for all proxied scripts
  }
})
```

Or selectively override specific flags:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    privacy: { ip: true }, // Anonymize IP on proxied traffic; direct requests are unaffected
  }
})
```

### Per-Script Privacy Override

Add `**privacy**` to a registry entry to override one script:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      // Apply all privacy transforms to Plausible instead of its IP-only default
      plausibleAnalytics: { scriptId: 'YOUR_SCRIPT_ID', privacy: true },
      // IP-only for self-hosted PostHog where you control the data
      posthog: { apiKey: 'phc_xxx', privacy: { ip: true } },
    }
  }
})
```

### Disabling Anonymization

Set `**privacy: false**` per script or globally to stop anonymizing data. Requests still pass through your server:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    privacy: false, // No anonymization for any script (routing still active)
  }
})
```

## Hiding Hostnames

By default, a proxy path includes the third-party hostname, for example `**/_scripts/p/us.i.posthog.com/e/**`. With a self-hosted service, that can expose an internal domain such as `**/_scripts/p/analytics.internal.example.com/api/send**`. A verbatim hostname also makes the request easier for ad blockers and network observers to classify.

Use `**proxy.alias**` to replace the hostname segment with an alias.

Set `**alias: true**` to auto-generate a short opaque alias per domain:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    proxy: {
      alias: true, // /_scripts/p/a1b2c3d4/e/
    }
  }
})
```

Or map specific domains to custom aliases. Domains not listed keep their verbatim hostname:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    proxy: {
      alias: {
        'us.i.posthog.com': 'ph',
        'analytics.internal.example.com': 'a',
      }
    }
  }
})
```

Aliases apply everywhere a proxy path is produced: build-time URL rewrites, auto-injected endpoints (such as PostHog's `**apiHost**`), runtime-intercepted requests, and Partytown worker requests. The server handler resolves the alias back to the real domain before forwarding upstream.

Aliases change only the hostname segment. Set the top-level `**prefix**` option, for example `**prefix: '/_t'**`, to change `**/_scripts/p**`.

Aliases keep the real hostname out of request **URLs**. If an SDK builds its collection URL at runtime, the host may still appear in the client JavaScript. Aliasing changes the network-visible path; it does not obfuscate your bundle.

## Separate Proxy Origin

By default, client-facing proxy URLs are relative to the page origin. Set `**proxy.origin**` to send them to another host instead, for example a subdomain that points at the same deployment:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    proxy: {
      origin: 'https://t.example.com',
    }
  }
})
```

Build-time URL rewrites, auto-injected endpoints, runtime-intercepted requests and Partytown worker requests then use `**https://t.example.com/_scripts/p/...**`. The server route, bundled script assets and the server-side proxy config keep their relative paths, so that origin must serve this Nuxt app's `**/_scripts/p/****` route.

Requests to the proxy origin are cross-origin. SDKs that read collection responses need CORS headers from that origin.

## Opting Out

### Per-Script

Disable proxying for a specific script using `**proxy: false**` in its registry config:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      plausibleAnalytics: { scriptId: 'YOUR_SCRIPT_ID', proxy: false },
      googleAnalytics: { id: 'G-XXXXXX' }, // still proxied
    }
  }
})
```

For scripts whose collection requests depend on AST URL rewriting, setting `**bundle: false**` also prevents those requests from using the proxy. Without a bundled script source, there are no SDK URLs or calls for the transform to rewrite.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      // Disables bundling and the proxy rewrites that depend on it
      metaPixel: { id: '123456', bundle: false },
    }
  }
})
```

PostHog receives its proxy endpoint through SDK config. Google Analytics receives its collection endpoint through SDK configuration. Both can proxy without bundling. Matomo does not: its normal main-thread loader remains direct unless you use the separate Partytown routing path described below.

### Static Hosting (SSG)

The reverse proxy requires a **server runtime**. A fully static deployment serves the output of [`**nuxt generate**`](https://nuxt.com/docs/getting-started/prerendering) without a Nitro process to handle `**/_scripts/p/****`.

Nuxt Scripts detects static output (`**nuxt generate**`, `**nuxt build --prerender**`, or a static Nitro preset) and disables proxying automatically, with a build warning listing the affected scripts. Scripts still bundle and load from your domain, but their collection requests keep their original third-party URLs and go directly to their origins. Proxy privacy and anonymization do not apply to those direct requests.

To keep requests proxied and anonymized, deploy the server output of `**nuxt build**` to a host that runs Nitro.

## Proxy Endpoint Security

Embed, avatar, and analytics proxy routes are public resources. They do not contain server-side API keys. Each route accepts only the upstream hosts and request shapes declared by its integration.

Runtime proxy fetches validate the initial upstream URL and every redirect target before requesting it. Direct local, private, link-local, and reserved targets are rejected on every runtime; Node deployments also validate and pin DNS results before opening the socket. Image routes reject active content types such as HTML and SVG. The Instagram embed route restricts post and stylesheet hosts, then sanitizes the returned fragment before client rendering.

Nuxt Scripts does not proxy Google Maps requests. Static Maps loads from Google with the public browser key, while location lookup uses the Maps JavaScript Places service. Apply website and API restrictions to the key, then configure Google Cloud quotas to cap spend. See [**Google Maps Platform security guidance**](https://developers.google.com/maps/api-security-best-practices).

If public embed traffic needs request limits, configure them at your deployment edge or add application middleware. Nitro 2 route rules do not provide a portable rate limiter.

## Supported Scripts

The groups below follow the [**capability declarations in the Nuxt Scripts registry**](https://github.com/nuxt/scripts/blob/main/packages/script/src/registry.ts).

### Full First-Party (Bundled + Proxied)

These scripts are downloaded at build time, served from your domain, and have their collection requests proxied through your server:

| **Category** | **Scripts** |
| --- | --- |
| **Analytics** | [**Plausible**](https://scripts.nuxt.com/scripts/plausible-analytics), [**Cloudflare Web Analytics**](https://scripts.nuxt.com/scripts/cloudflare-web-analytics), [**Umami**](https://scripts.nuxt.com/scripts/umami-analytics), [**Rybbit**](https://scripts.nuxt.com/scripts/rybbit-analytics), [**Databuddy**](https://scripts.nuxt.com/scripts/databuddy-analytics), [**Ahrefs Web Analytics**](https://scripts.nuxt.com/scripts/ahrefs-analytics), [**Vercel Analytics**](https://scripts.nuxt.com/scripts/vercel-analytics), [**Microsoft Clarity**](https://scripts.nuxt.com/scripts/clarity), [**Hotjar**](https://scripts.nuxt.com/scripts/hotjar) |
| **Ad Pixels** | [**Meta Pixel**](https://scripts.nuxt.com/scripts/meta-pixel), [**X Pixel**](https://scripts.nuxt.com/scripts/x-pixel), [**Snapchat Pixel**](https://scripts.nuxt.com/scripts/snapchat-pixel), [**Reddit Pixel**](https://scripts.nuxt.com/scripts/reddit-pixel), [**LinkedIn Insight Tag**](https://scripts.nuxt.com/scripts/linkedin-insight), [**Google AdSense**](https://scripts.nuxt.com/scripts/google-adsense) |
| **Video** | [**Vimeo Player**](https://scripts.nuxt.com/scripts/vimeo-player) |
| **Utility** | [**Intercom**](https://scripts.nuxt.com/scripts/intercom), [**Gravatar**](https://scripts.nuxt.com/scripts/gravatar) |

### Proxy Only

These integrations keep their SDK outside the build bundle and can send collection requests through your server:

| **Script** | **How it works** |
| --- | --- |
| [**Google Analytics**](https://scripts.nuxt.com/scripts/google-analytics) | Visitor-specific loader stays remote. Collection requests use the proxy on the main thread and with Partytown. |
| [**PostHog**](https://scripts.nuxt.com/scripts/posthog) | SDK installed as [`**posthog-js**`](https://posthog.com/docs/libraries/js#option-2-install-via-package-manager). Proxy endpoint auto-injected via `**apiHost**` config. |

Google still receives direct loader and other SDK requests from the browser. Proxy privacy transforms apply only to collection requests.

### Bundled, with Third-Party Runtime Traffic

These integrations serve their main loader from your domain, but some runtime requests still go directly to third-party servers:

| **Script** | **Remaining direct traffic** |
| --- | --- |
| [**Fathom**](https://scripts.nuxt.com/scripts/fathom-analytics) | Fathom's bot detection rejects beacons from the server's IP, so Nuxt Scripts bundles the SDK but leaves beacons direct. |
| [**Pulse**](https://scripts.nuxt.com/scripts/pulse-analytics) | Pulse identifies visitors from the connecting IP, so proxied beacons would merge everyone into one visitor. Nuxt Scripts bundles the tracker but leaves beacons direct. |
| [**Statable**](https://scripts.nuxt.com/scripts/statable-analytics) | Statable identifies visitors from the connecting IP and user agent, so proxied beacons would merge everyone into one visitor. Nuxt Scripts bundles the tracker but leaves beacons direct. |
| [**Segment**](https://scripts.nuxt.com/scripts/segment) | SDK constructs API URLs dynamically, bypassing request interception. |
| [**Crisp**](https://scripts.nuxt.com/scripts/crisp) | SDK loads secondary scripts and CSS at runtime from `**client.crisp.chat**`. |
| [**Mixpanel**](https://scripts.nuxt.com/scripts/mixpanel-analytics) | No proxy integration yet. |
| [**Bing UET**](https://scripts.nuxt.com/scripts/bing-uet) | No proxy integration yet. |
| [**npm**](https://scripts.nuxt.com/scripts/npm) | The registry entry bundles the selected package file but has no vendor-specific proxy rules. |
| [**YouTube Player**](https://scripts.nuxt.com/scripts/youtube-player) | Nuxt Scripts bundles the API loader, but the facade supplies a direct `**youtube.com**` or `**youtube-nocookie.com**` iframe host after the bundle transform runs. The iframe and its internal requests remain third-party. |
| [**Calendly**](https://scripts.nuxt.com/scripts/calendly) | The widget script and assets can use first-party routing, but booking iframes and their traffic load directly from `**calendly.com**`. |

Bundling avoids the main loader's connection to its original host, but it does not make all runtime traffic first-party.

### Direct Loading (No Active Bundle or Collection Proxy)

These integrations load their SDKs and runtime traffic directly from their configured hosts:

| **Script** | **Direct-loading behavior** |
| --- | --- |
| [**TikTok Pixel**](https://scripts.nuxt.com/scripts/tiktok-pixel) | Loader and collection requests stay direct to preserve visitor IDs and vendor cookies. Proxy anonymization does not apply. |
| [**Google Tag Manager**](https://scripts.nuxt.com/scripts/google-tag-manager) | Visitor-specific loader and scripts it loads remain direct. |
| **Stripe** | [**Stripe requires Stripe.js to load directly from **`**js.stripe.com**`](https://docs.stripe.com/payments/finalize-payments-on-the-server?platform=web&type=setup) for PCI compliance. |
| **PayPal** | Nuxt Scripts loads PayPal's v6 core from PayPal's documented [`**/web-sdk/v6/core**`** URL**](https://developer.paypal.com/upgrade/ec/guide/Web%20SDK%20v6/); the registry declares no bundle or collection proxy. |
| **Google reCAPTCHA** | Nuxt Scripts loads `**api.js**` or `**enterprise.js**` directly from Google, or from `**recaptcha.net**`; the registry declares no bundle or collection proxy. Google separately recommends loading reCAPTCHA early because [**more page context improves its assessment**](https://developers.google.com/recaptcha/docs/loading). |
| **Google Sign-In** | Google says [**self-hosted and offline copies are unsupported**](https://developers.google.com/identity/gsi/web/guides/get-google-api-clientid) so clients receive security and compatibility updates. |
| **Matomo** | The main-thread SDK is not bundled, so its normal requests keep using the configured Matomo host. With `**partytown: true**`, Nuxt Scripts can route matching worker requests through Partytown's `**resolveUrl**`; the Partytown limitations below still apply. |
| **Carbon Ads** | The component loads the ad script directly. Collection rewriting skips this entry because it does not bundle. |
| **Lemon Squeezy** | The composable loads the payment widget directly. Collection rewriting skips this entry because it does not bundle. |

Google Maps, SpeedCurve LUX, and Usercentrics also load directly because they do not declare bundle or collection-proxy capabilities.

## Partytown (Web Worker)

Load individual scripts in a [**Partytown web worker**](https://partytown.qwik.dev/how-does-partytown-work/) by setting `**partytown: true**` per script. The `**trigger**` below causes the registry plugin to call the composable globally; it does not delay the Partytown tag, which is written into the server-rendered HTML.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  modules: ['@nuxtjs/partytown', '@nuxt/scripts'],
  scripts: {
    registry: {
      plausibleAnalytics: { scriptId: 'YOUR_SCRIPT_ID', partytown: true, trigger: 'onNuxtReady' },
    }
  }
})
```

Forward arrays are auto-configured for supported scripts. You must install `**@nuxtjs/partytown**`.

The current Partytown path keeps only the script `**src**`. It skips other attributes, registry initialization hooks, trigger timing, and the usual composable proxy/context API. A declared Partytown capability means Nuxt Scripts knows the forwarding and routing configuration; it does not guarantee that an integration which depends on `**data-***` attributes or `**clientInit**` will initialize correctly. Verify the generated tag and vendor traffic.

The Partytown tracker has an [**open report of dropped GA4 sessions**](https://github.com/QwikDev/partytown/issues/583) when Google Tag Manager runs in a worker. Nuxt Scripts does not declare Partytown support for GTM. Test analytics delivery before moving GA4 to Partytown.

## Consent Integration

First-party mode controls *where* requests go. [**Consent triggers**](https://scripts.nuxt.com/docs/guides/consent) control *when* main-thread scripts load. The current Partytown path ignores trigger timing, so do not rely on a Nuxt Scripts consent trigger to gate a Partytown tag.

```vue
<script setup lang="ts">
const trigger = useScriptTriggerConsent()

useScriptGoogleAnalytics({
  id: 'G-XXXXXX',
  scriptOptions: { trigger }
})
</script>
```

### Third-Party Consent Managers

For tools like OneTrust, CookieBot, or Osano, bind their consent signal to a reactive ref:

```vue
<script setup lang="ts">
const hasAnalyticsConsent = ref(false)

// Example: OneTrust callback
onMounted(() => {
  window.OneTrust?.OnConsentChanged(() => {
    hasAnalyticsConsent.value = window.OnetrustActiveGroups?.includes('C0002') ?? false
  })
})

useScriptGoogleAnalytics({
  id: 'G-XXXXXX',
  scriptOptions: {
    trigger: useScriptTriggerConsent({ consent: hasAnalyticsConsent }),
  }
})
</script>
```

Or keep the registry entry infrastructure-only and call `**load()**` on the composable result when consent is granted:

nuxt.config.ts

```ts
export default defineNuxtConfig({
  scripts: {
    registry: {
      // Infrastructure only, load manually after consent
      googleAnalytics: { id: 'G-XXXXXX' },
    }
  }
})
```

app.vue

```vue
<script setup lang="ts">
const script = useScriptGoogleAnalytics()

function onConsentGranted() {
  script.load()
}
</script>
```

The [**Consent Management guide**](https://scripts.nuxt.com/docs/guides/consent) covers `**useScriptTriggerConsent()**` and vendor-specific controls.

Routing a request through your domain does not settle the consent question. For EU deployments, the EDPB's final [**Article 5(3) technical-scope guidance**](https://www.edpb.europa.eu/system/files/documents/2024-10/edpb_guidelines_202302_technical_scope_art_53_eprivacydirective_v2_en_0.pdf) covers tracking URLs, pixels, and JavaScript as well as cookies. Assess each script and jurisdiction before loading it.

## Troubleshooting

| **Problem** | **Fix** |
| --- | --- |
| Analytics not tracking | Check DevTools → Network for `**/_scripts/p/**` requests. Check Nitro server logs for proxy errors |
| Proxy not working on static site | Static output disables the proxy automatically and collection requests go direct. Deploy the `**nuxt build**` server output to enable proxying. See [**Static Hosting**](#static-hosting-ssg) |
| Stale script | Remove `**node_modules/.cache/nuxt/scripts**` and rebuild |
| Build download fails | Set `**assets.fallbackOnSrcOnBundleFail: true**` to fall back to direct loading |
| Debugging | Open Nuxt DevTools → Scripts to see proxy routes and privacy status |
| Geo accuracy reduced | IP anonymization uses an IPv4 /24 or IPv6 /48 prefix. Set `**privacy: false**` per script or globally to forward exact IPs |
| `**bundle: false**` stopped collection proxying | Keep bundling enabled for scripts whose proxy support depends on AST rewriting. Auto-injected integrations such as PostHog do not require bundling; main-thread Matomo remains direct |
| Per-script opt-out not working | For scripts with auto-inject (Plausible, PostHog, Umami, Rybbit, Databuddy), use `**proxy: false**` in the registry config |

[Edit this page](https://github.com/nuxt/scripts/edit/main/docs/content/1.guides/2.first-party.md)

[Markdown For LLMs](https://scripts.nuxt.com/docs/guides/first-party.md)

[**Warmup Strategy** Customize the preload or preconnect strategy used for your scripts.](https://scripts.nuxt.com/docs/guides/warmup) [**Cookie Consent** Gate scripts behind user consent and drive vendor-native consent APIs through a typed per-script \`consent\` object.](https://scripts.nuxt.com/docs/guides/consent)

**On this page **

- [Why Proxy Third-Party Scripts?](#why-proxy-third-party-scripts)
- [How First-Party Mode Works](#how-first-party-mode-works)
- [Usage](#usage)
- [Privacy Tiers](#privacy-tiers)
- [Hiding Hostnames](#hiding-hostnames)
- [Separate Proxy Origin](#separate-proxy-origin)
- [Opting Out](#opting-out)
- [Proxy Endpoint Security](#proxy-endpoint-security)
- [Supported Scripts](#supported-scripts)
- [Partytown (Web Worker)](#partytown-web-worker)
- [Consent Integration](#consent-integration)
- [Troubleshooting](#troubleshooting)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scripts.nuxt.com/#website","@type":"WebSite","description":"Nuxt Scripts lets you load third-party scripts with better performance, privacy, security and DX. It includes many popular third-parties out of the box.","name":"Nuxt Scripts","url":"https://scripts.nuxt.com/","publisher":{"@id":"https://scripts.nuxt.com/#identity"}},{"@id":"https://scripts.nuxt.com/docs/guides/first-party#webpage","@type":"WebPage","description":"Serve third-party scripts from your own domain in Nuxt. First-party mode bundles supported SDKs, proxies their requests, and anonymizes data before forwarding it.","name":"Proxy Third-Party Scripts Through Your Nuxt Server","url":"https://scripts.nuxt.com/docs/guides/first-party","breadcrumb":{"@id":"https://scripts.nuxt.com/docs/guides/first-party#breadcrumb"},"isPartOf":{"@id":"https://scripts.nuxt.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://scripts.nuxt.com/docs/guides/first-party"]}],"primaryImageOfPage":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/#identity","@type":"Organization","name":"Nuxt Scripts","url":"https://scripts.nuxt.com","logo":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/docs/guides/first-party#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Nuxt Scripts","item":"https://scripts.nuxt.com/","position":1},{"@type":"ListItem","name":"Documentation","item":"https://scripts.nuxt.com/docs","position":2},{"@type":"ListItem","name":"Guides","item":"https://scripts.nuxt.com/docs/guides","position":3},{"@type":"ListItem","name":"First-Party Mode: Privacy-Focused Proxy","item":"https://scripts.nuxt.com/docs/guides/first-party","position":4}]},{"@id":"https://scripts.nuxt.com/#logo","@type":"ImageObject","caption":"Nuxt Scripts","contentUrl":"https://scripts.nuxt.com/logo.svg","inLanguage":"en","url":"https://scripts.nuxt.com/logo.svg"}]}
```

## Sitemap

See the full [sitemap](https://scripts.nuxt.com/sitemap.md) for all pages.
