From 4ea6f2374d2927666209a37c270ea95d2ba7d227 Mon Sep 17 00:00:00 2001 From: Neel Nemade Date: Sat, 1 Aug 2026 11:03:08 +0530 Subject: [PATCH] Move Google Analytics ID to config --- web/README.md | 7 +++++++ web/config.example.js | 3 ++- web/index.html | 31 +++++++++++++++++++++++++------ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/web/README.md b/web/README.md index 96b6592..511d434 100644 --- a/web/README.md +++ b/web/README.md @@ -13,9 +13,16 @@ Set: - `supabaseUrl` — your Supabase project URL - `supabaseAnonKey` — anon or publishable key (safe for browser; protect data with RLS) - `donateUrl` — optional +- `analyticsId` — optional Google Analytics Measurement ID (for example `G-XXXXXXXXXX`). Leave empty to disable analytics. `config.js` is gitignored in the public repo. +### Google Analytics (optional) + +To enable Google Analytics on your deployment, set `analyticsId` in `web/config.js`. + +If `analyticsId` is left empty, no Google Analytics script is loaded. + ## Deploy From repo root: diff --git a/web/config.example.js b/web/config.example.js index 3046c4c..47cbcdf 100644 --- a/web/config.example.js +++ b/web/config.example.js @@ -4,5 +4,6 @@ window.CAREEROPS_CONFIG = { supabaseUrl: 'https://YOUR_PROJECT.supabase.co', supabaseAnonKey: 'YOUR_SUPABASE_ANON_OR_PUBLISHABLE_KEY', // optional - donateUrl: '' + donateUrl: '', + analyticsId: '' } diff --git a/web/index.html b/web/index.html index 40afa8f..38bf650 100644 --- a/web/index.html +++ b/web/index.html @@ -5,13 +5,32 @@ - - + + + +