Skip to content

Commit 8d88e23

Browse files
committed
add ID for Google Analytics
1 parent c1a56be commit 8d88e23

File tree

1 file changed

+13
-2
lines changed
  • themes/influencer-hugo/layouts/partials

1 file changed

+13
-2
lines changed

themes/influencer-hugo/layouts/partials/head.html

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
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 }}">
7+
<meta name="description"
8+
content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
89
{{ with .Site.Params.author }}
910
<meta name="author" content="{{ . }}">{{ end }}
1011
<!-- theme meta -->
@@ -17,7 +18,8 @@
1718
{{ end }}
1819

1920
<!-- snipcart -->
20-
<link id="snipcart-theme" type="text/css" href="https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css" rel="stylesheet">
21+
<link id="snipcart-theme" type="text/css" href="https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css"
22+
rel="stylesheet">
2123

2224
{{ "<!-- Main Stylesheet -->" | safeHTML }}
2325
{{ $styles := resources.Get "scss/style.scss" | toCSS | minify }}
@@ -27,4 +29,13 @@
2729
<link rel="shortcut icon" href="{{ `images/favicon.ico` | absURL }} " type="image/x-icon">
2830
<link rel="icon" href="{{ `images/favicon.ico` | absURL }} " type="image/x-icon">
2931

32+
<!-- Google tag (gtag.js) -->
33+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-S7BC1RT2JB"></script>
34+
<script>
35+
window.dataLayer = window.dataLayer || [];
36+
function gtag() { dataLayer.push(arguments); }
37+
gtag('js', new Date());
38+
39+
gtag('config', 'G-S7BC1RT2JB');
40+
</script>
3041
</head>

0 commit comments

Comments
 (0)