seo tools google tag manager - fitizens/hugo-modules GitHub Wiki
Google tag manager
GTM Module
Add the following code to your module list in the config/_default/module.toml
file.
[imports](/fitizens/hugo-modules/wiki/imports)
path = "github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager"
GTM Implementation
Call it, as a partial in your theme head.
<!-- google tag manager -->
{{ partial "gtm.html" . }}
Call it, as a partial in your theme body.
<!-- google tag manager noscript -->
{{ partial "gtm-noscript.html" . }}
Add this configuration to your config/_default/params.toml
file.
# google tag manager, see https://developers.google.com/tag-manager/
google_tag_manager = "" # example: G-XXXXXXXXXX