Skip to content

Commit c28beb2

Browse files
authored
Merge pull request #90 from InnerSourceCommons/google-analytics
Google analytics
2 parents 98bff99 + f15bee4 commit c28beb2

File tree

1 file changed

+14
-3
lines changed
  • themes/gathering-theme/layouts/partials

1 file changed

+14
-3
lines changed

themes/gathering-theme/layouts/partials/head.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
{{ "<!-- mobile responsive meta -->" | safeHTML }}
66
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
7-
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
8-
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
9-
7+
<meta name="description"
8+
content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
9+
{{ with .Site.Params.author }}
10+
<meta name="author" content="{{ . }}">{{ end }}
11+
1012
{{ "<!-- plugins -->" | safeHTML }}
1113
{{ range .Site.Params.plugins.css }}
1214
<link rel="stylesheet" href="{{ .link | absURL }}">
@@ -19,6 +21,15 @@
1921
{{ "<!--Favicon-->" | safeHTML }}
2022
<link rel="shortcut icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
2123
<link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
24+
<!-- Google tag (gtag.js) -->
25+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N2LHBZY3MV"></script>
26+
<script>
27+
window.dataLayer = window.dataLayer || [];
28+
function gtag() { dataLayer.push(arguments); }
29+
gtag('js', new Date());
30+
31+
gtag('config', 'G-N2LHBZY3MV');
32+
</script>
2233

2334
{{ template "_internal/opengraph.html" . }}
2435
{{ template "_internal/twitter_cards.html" . }}

0 commit comments

Comments
 (0)