1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/5f1bbc53e5e2/ Changeset: 5f1bbc53e5e2 User: martenson Date: 2014-11-04 16:14:31+00:00 Summary: initial commit of google analytics script Affected #: 3 files diff -r 65c55224199036694ee3de467567df69a74dd680 -r 5f1bbc53e5e2eeb3728f8db61fbaaf79d0bb3084 config/galaxy.ini.sample --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -375,6 +375,12 @@ #inactivity_box_content = Your account has not been activated yet. Feel free to browse around and see what's available, but you won't be able to upload data or run jobs until you have verified your email address. +# -- Analytics + +# You can enter tracking code here to track visitor's behavior +# through your Google Analytics account. Example: UA-XXXXXXXX-Y +#ga_code = None + # -- Display sites # Galaxy can display data at various external browsers. These options specify diff -r 65c55224199036694ee3de467567df69a74dd680 -r 5f1bbc53e5e2eeb3728f8db61fbaaf79d0bb3084 lib/galaxy/config.py --- a/lib/galaxy/config.py +++ b/lib/galaxy/config.py @@ -166,6 +166,7 @@ self.terms_url = kwargs.get( 'terms_url', None ) self.instance_resource_url = kwargs.get( 'instance_resource_url', None ) self.registration_warning_message = kwargs.get( 'registration_warning_message', None ) + self.ga_code = kwargs.get( 'ga_code', None ) # Get the disposable email domains blacklist file and its contents self.blacklist_location = kwargs.get( 'blacklist_file', None ) self.blacklist_content = None diff -r 65c55224199036694ee3de467567df69a74dd680 -r 5f1bbc53e5e2eeb3728f8db61fbaaf79d0bb3084 templates/base/base_panels.mako --- a/templates/base/base_panels.mako +++ b/templates/base/base_panels.mako @@ -116,15 +116,24 @@ ensure_dd_helper(); %if self.has_left_panel: - var lp = new Panel( { panel: $("#left"), center: $("#center"), drag: $("#left > .unified-panel-footer > .drag" ), toggle: $("#left > .unified-panel-footer > .panel-collapse" ) } ); - force_left_panel = function( x ) { lp.force_panel( x ) }; - %endif + var lp = new Panel( { panel: $("#left"), center: $("#center"), drag: $("#left > .unified-panel-footer > .drag" ), toggle: $("#left > .unified-panel-footer > .panel-collapse" ) } ); + force_left_panel = function( x ) { lp.force_panel( x ) }; + %endif %if self.has_right_panel: - var rp = new Panel( { panel: $("#right"), center: $("#center"), drag: $("#right > .unified-panel-footer > .drag" ), toggle: $("#right > .unified-panel-footer > .panel-collapse" ), right: true } ); - window.handle_minwidth_hint = function( x ) { rp.handle_minwidth_hint( x ) }; - force_right_panel = function( x ) { rp.force_panel( x ) }; - %endif + var rp = new Panel( { panel: $("#right"), center: $("#center"), drag: $("#right > .unified-panel-footer > .drag" ), toggle: $("#right > .unified-panel-footer > .panel-collapse" ), right: true } ); + window.handle_minwidth_hint = function( x ) { rp.handle_minwidth_hint( x ) }; + force_right_panel = function( x ) { rp.force_panel( x ) }; + %endif + + %if t.webapp.name == 'galaxy' and 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> ## Handle AJAX (actually hidden iframe) upload tool Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.