---
title: "Third-Party Scripts Meets Nuxt DX · Nuxt Scripts"
canonical_url: "https://scripts.nuxt.com/"
last_updated: "2026-04-28T23:30:20.654Z"
meta:
  description: "Better performance, privacy, security and DX for third-party scripts."
  "og:description": "Better performance, privacy, security and DX for third-party scripts."
  "og:title": "Third-Party Scripts Meets Nuxt DX · Nuxt Scripts"
---

```

Nuxt Scripts on GitHub

# Third-Party Scripts** Meets Nuxt DX **

Load third-party scripts with better performance, privacy, security and DX. Includes many popular third-parties out of the box.

[Get started](https://scripts.nuxt.com/docs/getting-started) [Star on GitHub](https://github.com/nuxt/scripts)

Plausible Analytics](https://scripts.nuxt.com/scripts/plausible-analytics) Cloudflare Web Analytics](https://scripts.nuxt.com/scripts/cloudflare-web-analytics "Cloudflare Web Analytics") Vercel Analytics](https://scripts.nuxt.com/scripts/vercel-analytics "Vercel Analytics") PostHog](https://scripts.nuxt.com/scripts/posthog "PostHog") Fathom Analytics](https://scripts.nuxt.com/scripts/fathom-analytics "Fathom Analytics") Matomo Analytics](https://scripts.nuxt.com/scripts/matomo-analytics "Matomo Analytics") Rybbit Analytics](https://scripts.nuxt.com/scripts/rybbit-analytics "Rybbit Analytics") Databuddy Analytics](https://scripts.nuxt.com/scripts/databuddy-analytics "Databuddy Analytics") Segment](https://scripts.nuxt.com/scripts/segment "Segment") Mixpanel](https://scripts.nuxt.com/scripts/mixpanel-analytics "Mixpanel") Bing UET](https://scripts.nuxt.com/scripts/bing-uet "Bing UET") Meta Pixel](https://scripts.nuxt.com/scripts/meta-pixel "Meta Pixel") X Pixel](https://scripts.nuxt.com/scripts/x-pixel "X Pixel") TikTok Pixel](https://scripts.nuxt.com/scripts/tiktok-pixel "TikTok Pixel") Snapchat Pixel](https://scripts.nuxt.com/scripts/snapchat-pixel "Snapchat Pixel") Reddit Pixel](https://scripts.nuxt.com/scripts/reddit-pixel "Reddit Pixel") Google Adsense](https://scripts.nuxt.com/scripts/google-adsense "Google Adsense") Intercom](https://scripts.nuxt.com/scripts/intercom "Intercom") Hotjar](https://scripts.nuxt.com/scripts/hotjar "Hotjar")Clarity](https://scripts.nuxt.com/scripts/clarity) Stripe](https://scripts.nuxt.com/scripts/stripe "Stripe") Lemon Squeezy](https://scripts.nuxt.com/scripts/lemon-squeezy "Lemon Squeezy") PayPal](https://scripts.nuxt.com/scripts/paypal "PayPal") Vimeo Player](https://scripts.nuxt.com/scripts/vimeo-player "Vimeo Player") YouTube Player](https://scripts.nuxt.com/scripts/youtube-player "YouTube Player") Google Maps](https://scripts.nuxt.com/scripts/google-maps "Google Maps") Bluesky Embed](https://scripts.nuxt.com/scripts/ "Bluesky Embed") Instagram Embed](https://scripts.nuxt.com/scripts/ "Instagram Embed") X Embed](https://scripts.nuxt.com/scripts/ "X Embed") Crisp](https://scripts.nuxt.com/scripts/crisp "Crisp") Google reCAPTCHA](https://scripts.nuxt.com/scripts/google-recaptcha "Google reCAPTCHA") Google Sign-In](https://scripts.nuxt.com/scripts/google-sign-in "Google Sign-In") Google Tag Manager](https://scripts.nuxt.com/scripts/google-tag-manager "Google Tag Manager") Google Analytics](https://scripts.nuxt.com/scripts/google-analytics "Google Analytics") Umami Analytics](https://scripts.nuxt.com/scripts/umami-analytics "Umami Analytics") Gravatar](https://scripts.nuxt.com/scripts/gravatar "Gravatar")

### **Better Web Vitals**

Load scripts when they're needed with best practices non-blocking the rendering of your Nuxt app by default.

### **Privacy for your users**

Avoid leaking user data to third-party scripts that don't need it. Ensure your scripts are GDPR compliant.

### **Secure third-parties**

Protect your app from third-party scripts that could be compromised.

## **A powerful API with ***just enough*** magic **

Nuxt Scripts provides an abstraction layer on top of third-party scripts, providing SSR support and type-safety while still giving you full low-level control over how a script is loaded.

app.vue

```
const { proxy } = useScript('/tracker.js', {
  trigger: 'onNuxtReady',
  use() {
    return { trackEvent: window.trackEvent }
  }
})

// fully typed, SSR safe
proxy.trackEvent('page_view')
```

## Speed up with Facade Components

Nuxt Scripts provides several [~~Facade Components ~~](https://developer.chrome.com/docs/lighthouse/performance/third-party-facades) out of the box.

Facade components are fake UI elements that get replaced once a third-party script loads, they can significantly improve your performance while still providing a great user experience, however they do have [~~trade-offs ~~](https://scripts.nuxt.com/docs/guides/facade-components).

### **Google Maps**

**Nuxt Scripts****11.9x Faster **

70ms

**Iframe**

830ms

### **YouTube**

**Nuxt Scripts****46.4x Faster **

70ms

**Iframe**

3.3s

### **Vimeo**

**Nuxt Scripts****3.7x Faster **

70ms

**Iframe**

260ms

### **Intercom**

**Nuxt Scripts****3.9x Faster **

220ms

**Iframe**

850ms

*Note that PageSpeed Insights lab data is a snapshot from a particular day, which tends to be variable.

## **Cookie consent, typed per vendor **

Every consent-aware script returns a `consent` object matching the vendor's native API, paired with `defaultConsent` applied before the first call.

Google Consent Mode v2, Meta grant/revoke, Matomo give/forget, TikTok three-state and more. Bridge OneTrust or Cookiebot, or ship your own banner with [~~useScriptTriggerConsent ~~](https://scripts.nuxt.com/docs/guides/consent).

consent.ts

```
const { consent } = useScriptGoogleAnalytics({
  id: 'G-XXXXXXXX',
  defaultConsent: {
    ad_storage: 'denied',
    analytics_storage: 'denied',
  },
})

// Google Consent Mode v2
consent.update({
  ad_storage: 'granted',
  analytics_storage: 'granted',
})
```

## **Privacy-first social embeds **

Embed posts from X, Instagram, and Bluesky without loading third-party scripts. All content is fetched server-side and proxied through your domain.

Zero client-side JavaScript, zero cookies, zero third-party requests.

| **Nuxt Scripts vs Native ** | X | Instagram | Bluesky |
| --- | --- | --- | --- |
| Client JS | **0**vs475 KB | **0**vs580 KB | **0**vs42 KB |
| Requests | **0**vs25 | **0**vs34 | **0**vs9 |
| Cookies | **No**vsYes | **No**vsYes | **No**vsNo |
| Blocking Time | **0ms**vs1,010ms | **0ms**vs780ms | **0ms**vs60ms |

![Alexander Lichter](https://scripts.nuxt.com/_scripts/embed/x-image?url=https%3A%2F%2Fpbs.twimg.com%2Fprofile_images%2F1705927743769026560%2F13XlDKGO_normal.jpg)

**Alexander Lichter**

@TheAlexLichter

✨Time to talk about the newest official @nuxt_js module - Nuxt Scripts! And not only covering why it is useful and what it does, but using the underlying `useScript` composable to load a *custom script* right into a demo application. Don't miss it out! 💚 Link below 👇 https://t.co/UjefeB3Ny9

12:30 PM · Aug 30, 20242 replies94 likes

__[![cloudflare](https://scripts.nuxt.com/_scripts/embed/instagram-image?url=https%3A%2F%2Fscontent-iad6-1.cdninstagram.com%2Fv%2Ft51.2885-19%2F291788865_1052446648810639_8402624417549329982_n.jpg%3Fstp%3Ddst-jpg_s150x150_tt6%26efg%3DeyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0%26_nc_ht%3Dscontent-iad6-1.cdninstagram.com%26_nc_cat%3D107%26_nc_oc%3DQ6cZ2gHAWtJ8hauWXD4ABKhuO1387Wf-1oPMtYEFVeh-FRk5hMrT603Mf47Nlk_b_RpfIPQ%26_nc_ohc%3DIA-rTCdRyrwQ7kNvwEU9txw%26_nc_gid%3DTnC_VjUB_4v2Uj-nRBJ3Qg%26edm%3DAPs17CUBAAAA%26ccb%3D7-5%26oh%3D00_Af0hUv4bSppykX3iOev4ZPB0sTKVRRX6nDj7o2byPYlxCA%26oe%3D69F72E03%26_nc_sid%3D10d13b)](https://www.instagram.com/stories/cloudflare/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[cloudflare_<u>Verified</u>_](https://www.instagram.com/cloudflare/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

69.3K followers

[View profile](https://www.instagram.com/cloudflare/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[![Instagram post shared by @cloudflare](https://scripts.nuxt.com/_scripts/embed/instagram-image?url=https%3A%2F%2Flookaside.instagram.com%2Fseo%2Fgoogle_widget%2Fcrawler%2F%3Fmedia_id%3D3301863824267753672)](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[![cloudflare](https://scripts.nuxt.com/_scripts/embed/instagram-image?url=https%3A%2F%2Fscontent-iad6-1.cdninstagram.com%2Fv%2Ft51.2885-19%2F291788865_1052446648810639_8402624417549329982_n.jpg%3Fstp%3Ddst-jpg_s150x150_tt6%26efg%3DeyJ2ZW5jb2RlX3RhZyI6InByb2ZpbGVfcGljLmRqYW5nby4xMDgwLmMyIn0%26_nc_ht%3Dscontent-iad6-1.cdninstagram.com%26_nc_cat%3D107%26_nc_oc%3DQ6cZ2gHAWtJ8hauWXD4ABKhuO1387Wf-1oPMtYEFVeh-FRk5hMrT603Mf47Nlk_b_RpfIPQ%26_nc_ohc%3DIA-rTCdRyrwQ7kNvwEU9txw%26_nc_gid%3DTnC_VjUB_4v2Uj-nRBJ3Qg%26edm%3DAPs17CUBAAAA%26ccb%3D7-5%26oh%3D00_Af0hUv4bSppykX3iOev4ZPB0sTKVRRX6nDj7o2byPYlxCA%26oe%3D69F72E03%26_nc_sid%3D10d13b)cloudflare_<u>Verified</u>_1,513 posts · 69K followers](https://www.instagram.com/cloudflare/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[View more on Instagram](https://www.instagram.com/cloudflare/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[____](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8) [_<u>Comment</u>_](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8) [_<u>Share</u>_](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8) [_<u>Save</u>_](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[50 likes](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

[Add a comment...](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8) [_<u>Instagram</u>_](https://www.instagram.com/p/C3Sk6d2MTjI/?ig_rid=fb848d0a-e232-40cc-aadd-51f92ade59d8)

![Jakub Andrzejewski](https://scripts.nuxt.com/_scripts/embed/bluesky-image?url=https%3A%2F%2Fcdn.bsky.app%2Fimg%2Favatar%2Fplain%2Fdid%3Aplc%3Ajxg2atjncgistoagvc6qkjx3%2Fbafkreigcwa6nq7vmu72wo5sqomkvhwxyl5u6u6rqf5q5qjua4t6ppmqsfy)

**Jakub Andrzejewski**

@jacobandrewsky.bsky.social

Are you struggling with third party scripts affecting performance of your [@nuxt.com](https://bsky.app/profile/did:plc:6gbm7hkapyhjt2jghosdzwv2) application? 🤔 Check out Nuxt Scripts module that brings several solutions to this problem with the amazing Developer Experience! 🚀 [scripts.nuxt.com](https://scripts.nuxt.com/)

11:12 AM · Apr 1, 20250 replies0 reposts4 likes

## **Watch the intro videos from the pros. **

## A faster web collaboration

Nuxt Scripts was designed and built by the Nuxt core team in collaboration with the [~~Chrome Aurora~~](https://developer.chrome.com/aurora) team at Google.

Nuxt Scripts is being actively maintained by the Nuxt core team and amazing community contributors, we welcome all contributions.

## **Try out our JS Confetti Tutorial **

Learn all of the fundamentals of Nuxt Scripts in the fun interactive confetti tutorial.

[**Get started **](https://scripts.nuxt.com/docs/getting-started/confetti-tutorial)