Third-Party Scripts
Meets Nuxt DX

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.

    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.

    Developer Experience First

    Type-safe and SSR friendly composables that just work wherever you need them.

    Secure third-parties

    Protect your app from third-party scripts that could be made 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 and while still giving you full low-level control over how a script is loaded.

Speed up with Facade Components

Nuxt Scripts provides several Facade Components 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 .

Google Maps

Nuxt Scripts 11.9x Faster
8%
70ms
Iframe
100%
830ms

YouTube

Nuxt Scripts 46.4x Faster
2%
70ms
Iframe
100%
3.3s

Vimeo

Nuxt Scripts 3.7x Faster
27%
70ms
Iframe
100%
260ms

Intercom

Nuxt Scripts 3.9x Faster
26%
220ms
Iframe
100%
850ms

*Note that PageSpeed Insights lab data is a snapshot from a particular day, which tends to be variable. We will be updating this section with aggregated results and/or field data from production usage as soon as it's available.

Cookie consent that's good enough to eat

Nuxt Scripts aims to improve end-user privacy by providing a simple API for managing cookie consent .

All scripts can be loaded conditionally based on user consent, set it up however you need.

A faster web collaboration

Nuxt Scripts was designed and built by the Nuxt core team in collaboration with the Chrome Aurora team at Google.

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

29
Contributors
GitHub User 5326365GitHub User 63512348GitHub User 372973GitHub User 28706372GitHub User 44604921GitHub User 3871688GitHub User 1840026GitHub User 27797762GitHub User 13294791GitHub User 542319GitHub User 32058490GitHub User 136018527GitHub User 5382986GitHub User 25490173GitHub User 46930GitHub User 29239704GitHub User 36746429GitHub User 904724GitHub User 17875165GitHub User 118292900GitHub User 12596485GitHub User 9987732GitHub User 5103210GitHub User 49682443GitHub User 36277184GitHub User 62211161GitHub User 78594224GitHub User 25792848GitHub User 2110083

Watch the intro videos from the pros.

Try out our JS Confetti Tutorial

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