npm.io
0.4.0 • Published 4d ago

@axiomhq/vercel-next

Licence
MIT
Version
0.4.0
Deps
1
Size
12 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

@axiomhq/vercel-next CI

Send Web-Vitals from Vercel to Axiom.

Get started

  1. Make sure you have the Axiom Vercel integration installed
  2. In your Vercel project, run npm install --save @axiomhq/vercel-next
  3. Wrap your NextJS config in withAxiomProxy like this in next.config.js:
const { withAxiomProxy } = require('@axiomhq/vercel-next');

module.exports = withAxiomProxy({
  // ... your existing config
})

This will proxy the Axiom ingest call to improve deliverability.

  1. Go to pages/_app.js or pages/_app.ts and add the following line:
export { reportWebVitals } from '@axiomhq/vercel-next';
  1. Deploy your site and watch data coming into your Axiom dashboard

Keywords