1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2025-05-13 15:57:49 +02:00

layouts: Test for existence of Google Analytics ID

Previously we showed the Cookie Usage banner if the site's config
had a cookie consent URL specified. As of 2018-05 (GDPR) it makes
more sense to only display this banner if the site has a Google
Analytics ID set. Because we are using Haven for consent manage-
ment we can now inject Google Analytics automatically after the
user has agreed, so we no longer need to use Hugo's internal te-
mplate.
This commit is contained in:
2020-05-17 22:32:12 +03:00
parent dedea8ccc0
commit 26f170bfdd
2 changed files with 2 additions and 4 deletions

View File

@ -26,7 +26,7 @@ Haven.create({
{
name: 'google-analytics',
options: {
id: '{{ .Site.Params.googleAnalytics }}',
id: {{ .Site.GoogleAnalytics }},
},
purposes: ['analytics'],
inject: true,