Integrate Matomo Analytics, an open-source alternative to Google Analytics, using the @socialgouv/matomo-next package.
Matomo (formerly Piwik) is arguably the most well-established open-source alternative to Google Analytics. There's a package which allows for an easy use of Matomo with NextJS projects: https://www.npmjs.com/package/@socialgouv/matomo-next I use it in my other NextJS projects by creating the following component: ```javascript import { init } from "@socialgouv/matomo-next"; import { useEffect } from "react"; const MATOMO_URL = process.env.NEXT_PUBLIC_MATOMO_URL || ""; const MATOMO_SITE_ID = process.env.NEXT_PUBLIC_MATOMO_SITE_ID || ""; const Matomo = () => { useEffect(() => { init({url: MATOMO_URL, siteId: MATOMO_SITE_ID}); }); return null; } export default Matomo; ``` And importing it in `_app.js` as: ```javascript import dynamic from 'next/dynamic' const Matomo = dynamic(() => import('../components/matomo'), { ssr: false }) ``` I couldn't integrate this into the `app/layout.tsx` because you can't use client-side "useEffe