nextra icon indicating copy to clipboard operation
nextra copied to clipboard

How to add vercel analytics to the Nextra Docs Project

Open thatbeautifuldream opened this issue 7 months ago • 1 comments

Vercel Analytics

import type { AppProps } from 'next/app';
import { Analytics } from '@vercel/analytics/react';
 
function MyApp({ Component, pageProps }: AppProps) {
  return (
    <>
      <Component {...pageProps} />
      <Analytics />
    </>
  );
}
 
export default MyApp;

Since there seems to be no app.tsx file in the /pages route how do we implement analytics?

If I try to add the app.tsx the build fails.

If there is a workaround that I am missing please help me.

thatbeautifuldream avatar Nov 28 '23 04:11 thatbeautifuldream