commit 2e6712e2814f333caa807888c1d8a9a5a3c03709
parent 65deb72dc4c9299416cf2d9defddb96dba4101fd
Author: Christian Oliff <christianoliff@yahoo.com>
Date: Sun, 10 Jun 2018 06:47:44 +0900
tpl: Always load GA script over HTTPS
Diffstat:
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hugolib/embedded_templates_test.go b/hugolib/embedded_templates_test.go
@@ -50,7 +50,7 @@ Disqus:
b.AssertFileContent("public/index.html",
"'anonymizeIp', true",
"'script','https://www.google-analytics.com/analytics.js','ga');\n\tga('create', 'ga_id', 'auto')",
- "<script async src='//www.google-analytics.com/analytics.js'>")
+ "<script async src='https://www.google-analytics.com/analytics.js'>")
// Disqus
b.AssertFileContent("public/index.html", "\"disqus_shortname\" + '.disqus.com/embed.js';")
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
@@ -163,7 +163,7 @@ if (!doNotTrack) {
ga('send', 'pageview');
}
</script>
-<script async src='//www.google-analytics.com/analytics.js'></script>
+<script async src='https://www.google-analytics.com/analytics.js'></script>
{{ end }}
{{- end -}}`},
{`google_news.html`, `{{ if .IsPage }}{{ with .Params.news_keywords }}
diff --git a/tpl/tplimpl/embedded/templates/google_analytics_async.html b/tpl/tplimpl/embedded/templates/google_analytics_async.html
@@ -23,6 +23,6 @@ if (!doNotTrack) {
ga('send', 'pageview');
}
</script>
-<script async src='//www.google-analytics.com/analytics.js'></script>
+<script async src='https://www.google-analytics.com/analytics.js'></script>
{{ end }}
-{{- end -}}-
\ No newline at end of file
+{{- end -}}