tpl: Always load GA script over HTTPS
authorChristian Oliff <christianoliff@yahoo.com>
Sat, 9 Jun 2018 21:47:44 +0000 (06:47 +0900)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 9 Jun 2018 21:47:44 +0000 (23:47 +0200)
hugolib/embedded_templates_test.go
tpl/tplimpl/embedded/templates.autogen.go
tpl/tplimpl/embedded/templates/google_analytics_async.html

index e04a37f6380feaf83cb409c685eb0a3301f738c2..23d809281cafacfe809d6f0d588d08c37e7b8857 100644 (file)
@@ -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';")
index 7226751b21f56748caf2b97a35724efdb0a47916..2bcb0dcdabc70347f3f2bf6335b1de7b5bbf5031 100644 (file)
@@ -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 }}
index 6a88ed8555cf07f50f350264b0e4436dc55757da..976be11fc88cdaa01b76929c0b8bcbbc9e364f2f 100755 (executable)
@@ -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 -}}