How to Integrate Google Analytics Into Hugo PaperMod Theme

As I’m setting up my shiny new blog, I stuck at Google Analytics integration. It looks like official PaperMod lacks some documentation on this topic. So… there is what worked for me. Don’t use analytics.google.SiteVerificationTag directive. Use only googleAnalytics: G-xxxxxxx directive. Create new file in layouts/_internal/google_analytics.html and paste the entire code snippet you got from GA property setup page. Basically that’s it. This partial will be automatically included in the every Hugo page....

2024 Feb 22 · Dzintars