Nuxt module for Agrid - Product analytics and feature flags
npm install @agrid/nuxt- Configures and uploads sourcemaps for Agrid Error Tracking
- Provides client initialization and auto exception capture for Vue and Nitro
``bash`
pnpm add @agrid/nuxtor
npm install @agrid/nuxtor
yarn add @agrid/nuxt
`ts
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@agrid/nuxt'],
sourcemap: { client: 'hidden' },
nitro: {
rollupConfig: { output: { sourcemapExcludeSources: false } },
},
agridConfig: {
host: 'YOUR_INGESTION_URL',
publicKey: 'YOUR_PUBLIC_KEY',
clientConfig: {}, // partial Browser SDK config
serverConfig: {}, // Node SDK options (error tracking only)
sourcemaps: {
enabled: true,
envId: process.env.AGRID_ENV_ID!,
project: 'my-application',
version: process.env.AGRID_RELEASE_VERSION,
personalApiKey: process.env.AGRID_PERSONAL_API_KEY!,
},
},
})
`
`ts`
const { $agrid } = useNuxtApp()
On the server, the initialized client is intended exclusively for error tracking. For other server-side analytics, instantiate a separate client where needed.
`bash``
pnpm i
pnpm build
- Main repo: https://github.com/agridvn/agrid-js