Deprecation of .Site.GoogleAnalytics in v0.120.0

https://gohugo.io/templates/internal/#google-analytics

site configuration

[services]
  [services.googleAnalytics]
    ID = 'G-MEASUREMENT_ID'

To create your own template, access the configured ID with {{ site.Config.Services.GoogleAnalytics.ID }} .