mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-20 17:42:21 +01:00
Add google tag manager
This commit is contained in:
parent
dfb4e7fabd
commit
ce91352dd5
@ -43,6 +43,9 @@ paginate = 5
|
|||||||
# Format dates with Go's time formatting
|
# Format dates with Go's time formatting
|
||||||
date_format = "Mon Jan 02, 2006"
|
date_format = "Mon Jan 02, 2006"
|
||||||
|
|
||||||
|
# Google Tag Manager id
|
||||||
|
# googleTagManager = "XXXZZZYYY"
|
||||||
|
|
||||||
# verification string for Google Webmaster Tools
|
# verification string for Google Webmaster Tools
|
||||||
#google_verify_meta = "BAi57DROASu4b2mkVNA_EyUsobfA7Mq8BmSg7Rn-Zp9"
|
#google_verify_meta = "BAi57DROASu4b2mkVNA_EyUsobfA7Mq8BmSg7Rn-Zp9"
|
||||||
|
|
||||||
|
@ -2,6 +2,16 @@
|
|||||||
<html lang="{{ .Lang }}">
|
<html lang="{{ .Lang }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
{{ if .Site.Params.googleTagManager }}
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||||
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||||
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||||
|
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||||
|
})(window,document,'script','dataLayer','{{ .Site.Params.googleTagManager }}');</script>
|
||||||
|
<!-- End Google Tag Manager -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "head-meta.html" . }}
|
{{ partial "head-meta.html" . }}
|
||||||
|
|
||||||
{{ block "schema-dot-org" . }}
|
{{ block "schema-dot-org" . }}
|
||||||
@ -30,7 +40,12 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
{{ if .Site.Params.googleTagManager }}
|
||||||
|
<!-- Google Tag Manager (noscript) -->
|
||||||
|
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.Params.googleTagManager }}"
|
||||||
|
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||||
|
<!-- End Google Tag Manager (noscript) -->
|
||||||
|
{{ end }}
|
||||||
<div class="blog-masthead">
|
<div class="blog-masthead">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<nav class="nav blog-nav">
|
<nav class="nav blog-nav">
|
||||||
|
Loading…
Reference in New Issue
Block a user