diff --git a/.env.example b/.env.example index 0020b8e..d4fd250 100644 --- a/.env.example +++ b/.env.example @@ -116,3 +116,11 @@ GA4_MEASUREMENT_ID= # Protocol API secrets. Leaking it lets anyone forge events into your GA4 # property. Required only if GA4_MEASUREMENT_ID is set. GA4_API_SECRET= + +# [PUBLIC] [optional] GA4 Measurement ID for client-side gtag.js page-view +# tracking. Format: "G-XXXXXXXXXX". Inlined into the bundle at build time +# via the NEXT_PUBLIC_ prefix — served to every visitor in the gtag.js +# script src, so not sensitive. When unset, app/layout.tsx skips rendering +# the GA4 + + )} ); diff --git a/types.d.ts b/types.d.ts index 43e2ba4..918afe4 100644 --- a/types.d.ts +++ b/types.d.ts @@ -43,6 +43,14 @@ declare namespace NodeJS { GA4_MEASUREMENT_ID: string; GA4_API_SECRET: string; + /** + * Client-side analytics (gtag.js). Optional — the GA4