athul / archie

A minimal Hugo Theme
https://athul.github.io/archie
MIT License
977 stars 299 forks source link

GA4 support #94

Closed avelino closed 4 months ago

avelino commented 1 year ago

11:18:01 AM: Error: error building site: render: failed to render pages: render of "page" failed: "/opt/build/repo/themes/archie/layouts/_default/baseof.html:8:12": execute of template failed: template: _default/single.html:8:12: executing "_default/single.html" at <partial "footer.html" .>: error calling partial: execute of template failed: html/template:partials/footer.html:14:12: no such template "_internal/google_analytics_async.html"

not supported and google analytics version 4

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MHKZRCJN0C"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '<TAG-ID-FIRST-G>');
</script>

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

Hugo includes an embedded template supporting Google Analytics 4.

avelino commented 4 months ago

fixed this PR #108