Closed harlan-zw closed 2 months ago
Allow users to load scripts without publishing script options.
For example, all of these are possible:
export default defineNuxtConfig({ scripts: { register: { googleAnalytics: { id: 'GA-123456789-1' } } }, })
export default defineNuxtConfig({ scripts: { register: { googleAnalytics: true } }, runtimeConfig: { public: { scripts: { googleAnalytics: { id: '', }, }, }, }, })
NUXT_PUBLIC_SCRIPTS_GOOGLE_ANALYTICS_ID=GA-123456789-1
const { gtag } = useScriptGoogleAnalytics()
export default defineNuxtConfig({ runtimeConfig: { public: { scripts: { googleAnalytics: { id: '', }, }, }, }, })
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Allow users to load scripts without publishing script options.
For example, all of these are possible: