File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed
Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 22# Copy this file to .env and fill in the actual values
33
44# MySQL Database
5- MYSQL_ROOT_PASSWORD = your-secure-mysql-password
5+ MYSQL_ROOT_PASSWORD = *PASSWORD_HERE*
6+
7+ # Umami Analytics
8+ UMAMI_WEBSITE_ID = *WEBSITE_ID_HERE*
69
710
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ services:
77 dockerfile : Dockerfile.frontend_prod
88 args :
99 NEXT_PUBLIC_BACKEND_URL : https://formula1datalab.com/api
10+ NEXT_PUBLIC_UMAMI_URL : https://formula1datalab.com/analytics
11+ NEXT_PUBLIC_UMAMI_WEBSITE_ID : ${UMAMI_WEBSITE_ID}
1012 image : f1datalab-frontend:latest
1113 container_name : f1datalab_frontend
1214 expose :
Original file line number Diff line number Diff line change @@ -5,9 +5,13 @@ WORKDIR /app
55
66
77ARG NEXT_PUBLIC_BACKEND_URL
8+ ARG NEXT_PUBLIC_UMAMI_URL
9+ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
810
911
1012ENV NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL
13+ ENV NEXT_PUBLIC_UMAMI_URL=$NEXT_PUBLIC_UMAMI_URL
14+ ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID=$NEXT_PUBLIC_UMAMI_WEBSITE_ID
1115
1216COPY package.json ./
1317COPY package-lock.json ./
Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ import "./globals.css";
33import { ThemeProvider } from "../components/ui/theme-provider" ;
44import { SidebarProvider } from "@/components/ui/sidebar" ;
55import { AppLayout } from "@/components/structure/app-layout" ; // Import the new component
6+ import Script from "next/script" ;
67
78export default function RootLayout ( {
89 children,
910} : Readonly < {
1011 children : React . ReactNode ;
1112} > ) {
13+ const umamiUrl = process . env . NEXT_PUBLIC_UMAMI_URL ;
14+ const umamiWebsiteId = process . env . NEXT_PUBLIC_UMAMI_WEBSITE_ID ;
15+
1216 return (
1317 < html lang = "en" >
1418 < body >
@@ -20,6 +24,15 @@ export default function RootLayout({
2024 </ AppLayout >
2125 </ SidebarProvider >
2226 </ ThemeProvider >
27+
28+ { /* Umami Analytics - proxied to bypass ad blockers */ }
29+ { umamiUrl && umamiWebsiteId && (
30+ < Script
31+ src = { `${ umamiUrl } /script.js` }
32+ data-website-id = { umamiWebsiteId }
33+ strategy = "afterInteractive"
34+ />
35+ ) }
2336 </ body >
2437 </ html >
2538 ) ;
You can’t perform that action at this time.
0 commit comments