main
md 27 lines 899 Bytes
Rendered Raw
1 # Setup secrets
2
3 ## Required secrets
4
5 ### `GA_MEASUREMENT_ID`
6
7 SquadScope uses `GA_MEASUREMENT_ID` to enable Google Analytics 4 on the deployed Hugo site.
8
9 Set it on the upstream repository with:
10
11 ```bash
12 gh secret set GA_MEASUREMENT_ID --body "G-XXXXXXXX"
13 ```
14
15 ## Fork-safety behavior
16
17 `hugo.toml` defaults `params.ga_measurement_id` to an empty string. The deploy workflow maps the repository secret to `HUGO_PARAMS_GA_MEASUREMENT_ID`; Hugo exposes that environment override as `params.ga.measurement.id`, and the analytics partial uses it only when the secret exists.
18
19 Forks do not inherit repository secrets, so fork builds render with no analytics by default. This is intentional: forks must not silently send traffic to the maintainer's GA property.
20
21 ## Opting out
22
23 Maintainers can disable analytics entirely by unsetting the repository secret:
24
25 ```bash
26 gh secret delete GA_MEASUREMENT_ID
27 ```