Cookie-Free Analytics for Nuxt
Nuxt applications benefit from analytics that tracks both server-rendered and client-navigated pages. GhostlyX integrates in one step using the useHead composable.
Installation guide
Add the script via useHead in app.vue
Open app.vue and use the useHead composable to inject the tracking script into the document head. GhostlyX will automatically track all route changes.
<script setup>
useHead({
script: [
{
src: 'https://cdn.ghostlyx.com/gx.js',
defer: true,
'data-site-id': 'YOUR_SITE_ID',
},
],
})
</script>
Alternative: use nuxt.config.ts
You can also add the script globally via the app.head section of nuxt.config.ts, which avoids adding it manually in app.vue.
export default defineNuxtConfig({
app: {
head: {
script: [
{
src: 'https://cdn.ghostlyx.com/gx.js',
defer: true,
'data-site-id': 'YOUR_SITE_ID',
},
],
},
},
})
Why Nuxt users choose GhostlyX
Nuxt is widely used in Europe, particularly in France and Germany where GDPR enforcement is strictest. Because GhostlyX sets no cookies, Nuxt apps using it avoid the consent management overhead entirely. The integration works with both SSR mode and static generation (nuxt generate), and tracks client-side navigations automatically.
Cookie-free tracking
No consent banner required under GDPR or PECR
Under 1.5 kB script
Negligible impact on page speed and Core Web Vitals
Real-time dashboard
See visitors as they arrive, updated every few seconds
Free plan available
Start tracking without a credit card
Replacing Google Analytics on Nuxt?
See how GhostlyX compares feature by feature, including script size, GDPR compliance, and pricing.
Related integrations
Ready to add GhostlyX to Nuxt?
Free plan available. Setup takes 5 minutes. No cookie consent banner required.
Get started free