From 732b4f5b1f45a6e676ff70590944f3b6dcf8a77f Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Tue, 20 Oct 2015 15:11:22 -0400 Subject: [PATCH] fix missing analytics on the analysis page we abandoned base_panels for this page so the script was missing --- templates/webapps/galaxy/root/index.mako | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/templates/webapps/galaxy/root/index.mako b/templates/webapps/galaxy/root/index.mako index ac4453a291a..e6370ae818a 100644 --- a/templates/webapps/galaxy/root/index.mako +++ b/templates/webapps/galaxy/root/index.mako @@ -60,4 +60,13 @@ ${h.css("base")} var app = new App( ${ h.dumps( app_config ) } ); } ); }); - \ No newline at end of file + + %if app.config.ga_code: + (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','//www.google-analytics.com/analytics.js','ga'); + ga('create', '${app.config.ga_code}', 'auto'); + ga('send', 'pageview'); + %endif +