fix support for GA v4 #84

This commit is contained in:
Dmitry Kolosov 2021-04-11 17:32:40 +03:00
parent 2308811cac
commit b9c021cab7

View File

@ -40,11 +40,7 @@
<meta property="article:publisher" content="https://www.facebook.com/XXX"> -->
{{ if and (.Site.GoogleAnalytics) (or (eq (getenv "HUGO_ENV") "production") (eq .Site.Params.env "production")) }}
{{ if hasPrefix .Site.GoogleAnalytics "UA-" }}
{{ template "_internal/google_analytics_async.html" . }}
{{ else }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partial "head-extra.html" . }}