Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: milo/appengine/frontend/templates/buildbot/includes/buildbot.html

Issue 2248893002: Settings page for analytics ID (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: milo/appengine/frontend/templates/buildbot/includes/buildbot.html
diff --git a/milo/appengine/frontend/templates/buildbot/includes/buildbot.html b/milo/appengine/frontend/templates/buildbot/includes/buildbot.html
index d9049475971bb58994d1a9253d2ccd3026f4a5fa..529755a88aa4cb38a3108bd54ba1aa3933971168 100644
--- a/milo/appengine/frontend/templates/buildbot/includes/buildbot.html
+++ b/milo/appengine/frontend/templates/buildbot/includes/buildbot.html
@@ -27,5 +27,14 @@ that can be found in the LICENSE file. -->
'use strict';
milo.makeTimesLocal();
})();
+{{ if .AnalyticsID }}
+(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
+
+ga('create', '{{.AnalyticsID}}', 'auto');
+ga('send', 'pageview');
+{{ end }}
</script>
{{end}}

Powered by Google App Engine
This is Rietveld 408576698