Read the official guide if you haven't used the google-analytics before.
For development (live preview):
export G_PROPERTY="G-XXXXXXXX"
make serve
# build locally
make build
For github-pages:
-
Set a repository variable named
G_PROPERTY
with your google property id -
Trigger
ci.yaml
to update changes
The cookie consent is enabled with the google analytics.
Unset the environment and delete the repository variable.
See Makefile
in the github repository.