Google Analytics
Add the measurement ID to the site config. Older Hugo docs used Universal Analytics (UA-…) with _internal/google_analytics_async.html. Prefer open_in_new GA4
with the current internal template for your Hugo version:
googleAnalytics = "G-XXXXXXXXXX"
In the head partial:
{{ template "_internal/google_analytics.html" . }}
(or _internal/google_analytics_async.html on older Hugo).
Disqus
disqusShortname = "shortname-from-disqus-service"
<section class="comments">
<h3>Comments</h3>
{{ if .Params.disableComments }}
<p>Comments are disabled for this post</p>
{{ else }}
{{ template "_internal/disqus.html" . }}
{{ end }}
</section>
Set disableComments: true in front matter to skip Disqus on a page.
RSS
Hugo builds RSS 2.0 feeds by default: /index.xml for the site and /section/index.xml for sections.
Link alternative formats from the head — see templates
(.AlternativeOutputFormats). A simple manual tag looks like:
<link rel="alternate" type="application/rss+xml" href="https://example.com/index.xml" title="Feed">
Andrew Dorokhov