Skip to content

Google Analytics Tag not showing on production #331

Discussion options

You must be logged in to vote

I followed the exact same steps. I placed the googleAnalytics = "G-xxxxxxxxxx" value right above [taxonomies] in hugo.toml. When I look into the generated file public/en/index.html I do see the following line as expected:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-xxxxxxxxxx"></script>

The beginning of the hugo.toml file looks like this (I only inserted the Google tag):

title = "Hinode"
copyright = "Copyright © 2023 Mark Dumay."
paginate = 9
enableGitInfo = true

# additional settings
baseURL = "https://template.gethinode.com/"
canonifyURLs = false
enableEmoji = true
enableRobotsTXT = true
enableInlineShortcodes = true

# prevent build failures when using Hugo's Inst…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ivanbrunodemorais
Comment options

Comment options

You must be logged in to vote
2 replies
@ivanbrunodemorais
Comment options

@markdumay
Comment options

Answer selected by ivanbrunodemorais
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants