diff --git a/.env.example b/.env.example index f700285..3c3cf38 100644 --- a/.env.example +++ b/.env.example @@ -11,6 +11,7 @@ FINNHUB_API_KEY= FINNHUB_BASE_URL= NEXT_PUBLIC_APPWRITE_ENDPOINT= NEXT_PUBLIC_APPWRITE_PROJECT_ID= +NEXT_PUBLIC_GTM_ID= OLLAMA_MODEL= VERCEL_ORG_ID= VERCEL_PROJECT_ID= diff --git a/README.md b/README.md index 17b0c22..defc8ea 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Most stock market tools are either expensive, cluttered with ads, or locked behi - Dark mode support - Mobile-friendly responsive design -No paywall for core features. No tracking. Just a clean stock analysis tool you can run yourself. +No paywall for core features. No forced tracking. Just a clean stock analysis tool you can run yourself. ## Screenshots @@ -92,6 +92,7 @@ Also required for trial features: `APPWRITE_COLLECTION_ID_TRIAL_SESSIONS`. | `RATE_LIMIT_MAX_REQUESTS` | Max API requests per window | `100` | | `RATE_LIMIT_WINDOW_SECONDS` | Rate limit window in seconds | `60` | | `LOG_LEVEL` | Logging level | `info` | +| `NEXT_PUBLIC_GTM_ID` | Google Tag Manager container ID (enables GTM when set, e.g. `GTM-XXXXXXX`) | unset | | `DEV_OVERRIDE_PRICING_TIER` | Temporary non-prod tier override (`FREE`,`ADS_FREE`,`LOCAL`,`BYOK`,`HOSTED_AI`) | unset | | `DEV_OVERRIDE_PRICING_TIER_USER_IDS` | Optional comma-separated user IDs for scoped override | unset | diff --git a/app/layout.tsx b/app/layout.tsx index e800f21..a8eb17d 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,6 @@ import type { Metadata } from "next"; import { Ibarra_Real_Nova, Merriweather } from "next/font/google"; +import Script from "next/script"; import "./globals.css"; import { Providers } from "./providers"; @@ -30,9 +31,20 @@ export default function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + const gtmId = process.env.NEXT_PUBLIC_GTM_ID?.trim(); + return (
+ {gtmId ? ( + + ) : null} + {gtmId ? ( + + ) : null}