diff --git a/.env.example b/.env.example index 9829c8a..78c90a2 100755 --- a/.env.example +++ b/.env.example @@ -45,6 +45,8 @@ BERRYBRAIN_DONATION_URL= NEXT_PUBLIC_BERRYBRAIN_API_URL=/berrybrain NEXT_PUBLIC_BERRYBRAIN_BASE_PATH=/berrybrain NEXT_PUBLIC_BERRYBRAIN_ASSET_PREFIX=/berrybrain +# Optional. Leave empty on self-hosted instances to disable Google Analytics. +NEXT_PUBLIC_GOOGLE_ANALYTICS_ID= BERRYBRAIN_AUTH_RATE_LIMIT_WINDOW_SECONDS=900 BERRYBRAIN_AUTH_RATE_LIMIT_MAX_ATTEMPTS=8 BERRYBRAIN_AUTH_LOCKOUT_MINUTES=15 diff --git a/README.md b/README.md index b59b3ad..afb6a97 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ There is no central BerryBrain account, SaaS tenant, billing gate, demo mode, or   +[](https://ko-fi.com/T5D823778G) + --- ## Table of Contents @@ -622,6 +624,7 @@ Edit `.env` and set at minimum: | `BERRYBRAIN_INTERNAL_API_URL` | Server-side API origin used by the web proxy. Defaults to `http://api:8000`; use `http://127.0.0.1:8000` when running Web outside Docker. | | `BERRYBRAIN_ENV_FILE` | Optional Compose environment file path. Defaults to `.env`; useful for isolated smoke tests or multiple self-hosted instances. | | `BERRYBRAIN_DONATION_URL` | Optional donation link shown/documented by the operator; no payment processing is built in. | +| `NEXT_PUBLIC_GOOGLE_ANALYTICS_ID` | Optional analytics property for public pages. Empty by default on self-hosted instances; tracking still requires visitor consent. Never send note or account data as analytics events. | | `BERRYBRAIN_PUBLIC_APP_URL` | Public base URL of the web app (used in emails/links). | | `BERRYBRAIN_CORS_ORIGINS` | Comma-separated allowed web origins. | | `SMTP_*` | Optional legacy email delivery settings. Not required for default self-hosted setup. | diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index f35eeed..fbb2f44 100755 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -1,5 +1,6 @@ import type { Metadata, Viewport } from "next"; import { PwaRegister } from "@/components/pwa-register"; +import { ThirdPartyIntegrations } from "@/components/third-party-integrations"; import berrylogo from "../../public/berrylogo.png"; import "./globals.css"; @@ -50,6 +51,7 @@ export default function RootLayout({