Problem with web analytics and speedinsights

I’ve installed both analytics and speedinsights packages, added in the necessary codes in my layout.js, but nothing is working (even with Cursor helping out). The page deployed without problem, just no analytics or insights.

I did the same thing for my other page .tsx and analytics work just fine.

layout.js

import "./Styles.css";
import { Analytics } from '@vercel/analytics/react';

<html lang="en">
      <body>
        {children}
        <Analytics />
      </body>
    </html>

package.json

"@vercel/analytics": "^1.4.1",

Please help :slight_smile: thanks!

Fixed. Ran 5 sets of rm and reinstall commands to get a clean clean start to redo everything. Still unsure what’s the bug, but analytics and speed insights are working now. Closing this.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.