@axiomhq/vercel-next
Send Web-Vitals from Vercel to Axiom.
Get started
- Make sure you have the Axiom Vercel integration installed
- In your Vercel project, run
npm install --save @axiomhq/vercel-next
- Wrap your NextJS config in
withAxiomProxy
like this innext.config.js
:
const { withAxiomProxy } = require('@axiomhq/vercel-next');
module.exports = withAxiomProxy({
// ... your existing config
})
This will proxy the Axiom ingest call to improve deliverability.
- Go to
pages/_app.js
orpages/_app.ts
and add the following line:
export { reportWebVitals } from '@axiomhq/vercel-next';
- Deploy your site and watch data coming into your Axiom dashboard