Skip to content

Commit

Permalink
Add analytics site-wide
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Sep 18, 2024
1 parent ad7cfc9 commit 4429576
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/engineeringblog/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CssBaseline, ThemeProvider } from "@mui/material";
import { AppRouterCacheProvider } from "@mui/material-nextjs/v13-appRouter";
import { GoogleAnalytics } from "@next/third-parties/google";
import type { Metadata } from "next";

import logoLight from "@/engineeringblog/assets/images/logo-light.png";
import Footer from "@/engineeringblog/components/Footer";
import NavBar from "@/engineeringblog/components/NavBar";
import theme from "@/engineeringblog/theme";

import { getSettings } from "@/engineeringblog/lib/data";
import logoLight from "@/engineeringblog/assets/images/logo-light.png";
import theme from "@/engineeringblog/theme";

export const metadata: Metadata = {
title: "Technology | Code for Africa",
Expand All @@ -20,7 +20,7 @@ export default async function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
const { connect, primaryNavigation, secondaryNavigation } =
const { analytics, connect, primaryNavigation, secondaryNavigation } =
await getSettings();
// TODO: blurWidth/blurHeight https://github.com/vercel/next.js/issues/56511
const { blurWidth, blurHeight, ...logoProps } = logoLight;
Expand All @@ -46,6 +46,7 @@ export default async function RootLayout({
</ThemeProvider>
</AppRouterCacheProvider>
</body>
<GoogleAnalytics gaId={analytics?.analyticsId} />
</html>
);
}

0 comments on commit 4429576

Please sign in to comment.