Skip to content

bep/hugo-mod-minimalanalytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Hugo Module wraps Minimal Analytics's GA4 script for easy integration with Hugo sites.

Import the module and set your GA4 tracking ID in your hugo.toml like this:

[module]
    [[module.imports]]
        path = "github.com/bep/hugo-mod-minimalanalytics"

[params]
    [params.minimalanalytics]
        # GA4 tracking ID
        tracking_id = "G-MYTRACKINGID"

Then include the partial in your HTML templates, typically in the <head> section:

{{ if  hugo.IsProduction }}
  {{ partial "minimalanalytics.html" . }}
{{ end }}

About

Work in progress.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •