add branch dimensional data to GA

This commit is contained in:
Matthew Wong 2022-08-27 11:19:06 -04:00
parent 89ddc0d8f1
commit b486170763
2 changed files with 8 additions and 1 deletions

View File

@ -30,4 +30,6 @@ enableGitInfo = true
tabWidth = 4
[markup.goldmark.renderer]
unsafe= true
[security]
[security.funcs]
getenv = ['^HUGO_', '^BRANCH']

View File

@ -82,3 +82,8 @@
<!-- End Meta Pixel Code -->
</head>
{{ template "_internal/google_analytics.html" . }}
<script>
ga('send', 'pageview', {
'Branch': '{{ getenv "BRANCH" }}'
});
</script>