0.4.0 • Published 3 years ago
@axiomhq/vercel-next v0.4.0
@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
withAxiomProxylike 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.jsorpages/_app.tsand add the following line:
export { reportWebVitals } from '@axiomhq/vercel-next';- Deploy your site and watch data coming into your Axiom dashboard