// import App from 'next/app' import "@fortawesome/fontawesome-free/css/all.min.css"; import 'bootstrap-css-only/css/bootstrap.min.css'; import 'mdbreact/dist/css/mdb.css'; import { Fragment, useEffect } from 'react'; import "../components/css/styles.css" import { Router, useRouter } from 'next/router' import { init } from "@socialgouv/matomo-next"; const MATOMO_URL = process.env.NEXT_PUBLIC_MATOMO_URL; const MATOMO_SITE_ID = process.env.NEXT_PUBLIC_MATOMO_SITE_ID; console.log(MATOMO_URL); function MyApp({ Component, pageProps }) { const router = useRouter() useEffect(() => { const handleRouteChange = (url) => { }; init({ url: MATOMO_URL, siteId: MATOMO_SITE_ID }); router.events.on("routeChangeComplete", handleRouteChange); return () => { router.events.off("routeChangeComplete", handleRouteChange); }; }, [router.events]); return ( ) } // Only uncomment this method if you have blocking data requirements for // every single page in your application. This disables the ability to // perform automatic static optimization, causing every page in your app to // be server-side rendered. // // MyApp.getInitialProps = async (appContext) => { // // calls page's `getInitialProps` and fills `appProps.pageProps` // const appProps = await App.getInitialProps(appContext); // // return { ...appProps } // } export default MyApp