digitalcraftsman / hugo-cactus-theme

Port of Nick Balestra's Cactus theme to Hugo.
MIT License
198 stars 111 forks source link

Google analytics code is not present on my rendered page #22

Closed primoz-k closed 7 years ago

primoz-k commented 7 years ago

In index.html I see, that the partial js.html is present and it contains the code with which GA should be included (https://github.com/digitalcraftsman/hugo-cactus-theme/blob/master/layouts/partials/js.html#L10), but I don't see it in my published page.

I only see these lines from js.html in my page:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://primozk.gitlab.io/js/main.js"></script>
<script src="https://primozk.gitlab.io/js/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

I have set a googleAnalytics value in my [params] section of config.toml.

Am I doing something wrong?

primoz-k commented 7 years ago

This was on me, I moved googleAnalytics value outside from [params] and it works now.

digitalcraftsman commented 7 years ago

That's because I'm using Hugo's built-in template for GA.