themefisher / meghna-hugo

Meghna Hugo is a responsive, minimalist, lightweight, and fast loading one-page business theme built with HTML5/CSS3, Hugo, JavaScript, and JQuery.
https://gethugothemes.com/products/meghna/?utm_source=meghna_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
441 stars 1.23k forks source link

Google Analytics, Tag manager #158

Closed Oxko closed 3 years ago

Oxko commented 3 years ago

Hi Team, I wonder can you advise where to add in the template the google analytics and tag manager html codes? Also per google setup i need to add the html codes to each section in the site, although there is one single field already setup in Hugo to add the analytics ID only, and that is in the config.toml. But I cannot figure out where to add the analytics and tag manager's html codes in the template?.

somratpro commented 3 years ago

Hello @Oxko

You can add Analytics ID in config.toml file, no need to add the script, and Tag manager script paste in layouts>partials>head.html

Oxko commented 3 years ago

Thanks a lot.