mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
hugolib: Deprecate .Site.GoogleAnalytics
Use .Site.Config.Services.GoogleAnalytics.ID instead.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
d4016dd5cd
commit
a692278bc6
@@ -1,7 +1,7 @@
|
||||
{{ warnf "_internal/google_analytics_async.html is no longer supported by Google and will be removed in a future version of Hugo" }}
|
||||
{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
|
||||
{{- if not $pc.Disable -}}
|
||||
{{ with .Site.GoogleAnalytics }}
|
||||
{{ with .Site.Config.Services.GoogleAnalytics.ID }}
|
||||
<script type="application/javascript">
|
||||
{{ template "__ga_js_set_doNotTrack" $ }}
|
||||
if (!doNotTrack) {
|
||||
|
Reference in New Issue
Block a user