Nextra docs with Web Analytics
Unanswered
Sun bear posted this in #help-forum
Original message was deleted.
17 Replies
Sun bear
Any guesses?

Hello @Sun bear
So, on your layout
You add the following lines:
import { Analytics } from '@vercel/analytics/react';
<Analytics />If you use /app use
import { Analytics } from '@vercel/analytics/react';
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<title>Next.js</title>
</head>
<body>
{children}
<Analytics />
</body>
</html>
);
}if you use /pages use
import { Analytics } from '@vercel/analytics/react';
function MyApp({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<Analytics />
</>
);
}
export default MyApp;@zAguss🦆 So, on your layout
Sun bear
What layout?
Nextra docs does not have it
Or i'm just not finding
I've read the instructions in the docs, but none were for nextra
Sun bear
But in which file it should be?