commit ff28120e53c7d3d5fce9941082f72eb89adb43b7
parent 8f6f13104e0a3a8e7bdb8ec4de4d8a2af7e1048d
Author: Wade Fitzpatrick <wade@waddles.org>
Date: Thu, 17 Dec 2015 15:56:16 +1000
Added async version of Google Analytics internal template
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/tpl/template_embedded.go b/tpl/template_embedded.go
@@ -233,4 +233,13 @@ ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
{{ end }}`)
+
+ t.AddInternalTemplate("", "google_analytics_async.html", `{{ with .Site.GoogleAnalytics }}
+<script>
+window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
+ga('create', '{{ . }}', 'auto');
+ga('send', 'pageview');
+</script>
+<script async src='//www.google-analytics.com/analytics.js'></script>
+{{ end }}`)
}