Skip to content

Commit 8b189f7

Browse files
authored
Enable Google Analytics via Hugo service (#277)
Signed-off-by: Patrice Chalin <[email protected]>
1 parent dc5b684 commit 8b189f7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

config.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ staticDir = ['assets']
99
[project]
1010
name = 'CloudNativePG'
1111

12+
[services]
13+
[services.googleAnalytics]
14+
id = 'G-SJWWHL48V3'
15+
1216
[params]
1317
description = 'CloudNativePG - PostgreSQL Operator for Kubernetes'
1418
images = ['images/hero_image.png']
15-

layouts/_default/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<script async defer src="https://buttons.github.io/buttons.js"></script>
2828
{{ template "_internal/twitter_cards.html" . }}
2929
{{ template "_internal/opengraph.html" . }}
30+
{{ if hugo.IsProduction -}}
31+
{{ template "_internal/google_analytics.html" . -}}
32+
{{ end -}}
3033
</head>
3134

3235
<body>

0 commit comments

Comments
 (0)