diff options
-rw-r--r-- | layouts/partials/analytic-google.html | 13 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
2 files changed, 1 insertions, 14 deletions
diff --git a/layouts/partials/analytic-google.html b/layouts/partials/analytic-google.html deleted file mode 100644 index aa9915b..0000000 --- a/layouts/partials/analytic-google.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ with .Site.GoogleAnalytics }} -<!-- Global site tag (gtag.js) - Google Analytics --> -<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script> -<script> - window.dataLayer = window.dataLayer || []; - - function gtag() { - dataLayer.push(arguments); - } - gtag('js', new Date()); - gtag('config', '{{ . }}'); -</script> -{{ end }}
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 861e6bc..2b12e1d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -23,7 +23,7 @@ {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }} -{{ partial "analytic-google.html" . }} +{{ template "_internal/google_analytics_async.html" . }} <!-- global css --> {{ $options := (dict "targetPath" "css/main.min.css" "outputStyle" "compressed") }} |