Skip to content

Commit

Permalink
Merge pull request #958 from martenson/fix-google-analytics
Browse files Browse the repository at this point in the history
[15.10] Fix google analytics on the analysis page
  • Loading branch information
dannon committed Oct 20, 2015
2 parents 0f9067d + 732b4f5 commit d53e13a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion templates/webapps/galaxy/root/index.mako
Expand Up @@ -60,4 +60,13 @@ ${h.css("base")}
var app = new App( ${ h.dumps( app_config ) } );
} );
});
</script>
%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
</script>

0 comments on commit d53e13a

Please sign in to comment.