Install guides
Nuxt 3 (Vue)
Install DataLook on Nuxt 3 (Vue) — the plain script tag, or the first-party proxy that beats ad blockers. Both on one page.
Register the script in your Nuxt config head.
Add the script to app.head
export default defineNuxtConfig({ app: { head: { script: [ { src: 'https://cdn.datalook.app/s.js', defer: true, 'data-site': 'YOUR_SITE_ID' }, ], }, },})The proxy install serves both s.js and the collector from your own domain, so ad blockers — which match on domain, not path — can't see us. You rewrite one innocuous path prefix to our CDN; the script figures out the rest.
Nitro proxies the prefix; the head script points at it.
Proxy the prefix with routeRules
export default defineNuxtConfig({ routeRules: { '/_axis/**': { proxy: 'https://cdn.datalook.app/**' }, }, app: { head: { script: [ { src: '/_axis/s.js', defer: true, 'data-site': 'YOUR_SITE_ID' }, ], }, },})Heads up
Your server now sits between the visitor and us, so forward the visitor IP (X-Forwarded-For) or your country breakdown will collapse to your server location. The DNS proxy avoids this entirely — see the proxy overview.