Skip to content

Commit 58132d6

Browse files
committed
Adding Google tag
1 parent 98bff99 commit 58132d6

File tree

1 file changed

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

1 file changed

+15
-3
lines changed

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

Lines changed: 15 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,16 @@
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-1S62VE6ZNR"></script>
26+
<script>
27+
window.dataLayer = window.dataLayer || [];
28+
function gtag() { dataLayer.push(arguments); }
29+
gtag('js', new Date());
30+
31+
gtag('config', 'G-1S62VE6ZNR');
32+
</script>
33+
2234

2335
{{ template "_internal/opengraph.html" . }}
2436
{{ template "_internal/twitter_cards.html" . }}

0 commit comments

Comments
 (0)