diff --git a/rhodecode/templates/base/root.html b/rhodecode/templates/base/root.html --- a/rhodecode/templates/base/root.html +++ b/rhodecode/templates/base/root.html @@ -21,18 +21,18 @@ %if c.ga_code: - - %endif + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + + %endif ## JAVASCRIPT ## <%def name="js()"> @@ -94,7 +94,7 @@ YUD.addClass('quick_login_link','enabled'); var usr = YUD.get('username'); if(usr){ - usr.focus(); + usr.focus(); } } });