Skip to content

Commit

Permalink
tpl: Always load GA script over HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
coliff authored and bep committed Jun 9, 2018
1 parent 65deb72 commit 2e6712e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hugolib/embedded_templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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';")
Expand Down
2 changes: 1 addition & 1 deletion tpl/tplimpl/embedded/templates.autogen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions tpl/tplimpl/embedded/templates/google_analytics_async.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
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 -}}
{{- end -}}

0 comments on commit 2e6712e

Please sign in to comment.