UtkarshVerma / hugo-dream-plus

:rainbow: An upgraded version of the Hugo "Dream" theme with tons of new features.
http://dream-plus-posts.netlify.com
MIT License
68 stars 66 forks source link

Increase Support for Google Analytics #74

Open LucasSymons opened 4 years ago

LucasSymons commented 4 years ago

Is your feature request related to a problem? Please describe.
I have an issue where the google analytics code isn't added to the default landing page (/index.html) once the site is built. However the code is added to my "posts pages"

Describe the solution you'd like
Please include the Google Analytics code into the default landing page so that more accurate analytics can be collected.

Describe alternatives you've considered
I am looking into manually adding it in via my hugo build, if i work it out I will raise a PR :) I also looked at just adding it at the cloudflare level but I seem to be having an issue with that due to other parts of my setup.

Additional context
To enable it on the posts pages all i did was add,

googleAnalytics = "UA-111111111-1"

To the root of the config.toml right under the robots.txt param.

zxkane commented 4 years ago

Not sure it's an actual issue. I do see GA code in index page of my site.