- if Rails.application.config.analytics.google.id
  - content_for :on_ready do
    :plain
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '#{Rails.application.config.analytics.google.id}']);
      _gaq.push(['_trackPageview']);
      $(document).on('page:change', function(){
        _gaq.push(['_trackPageview'])
      });

- if Rails.application.config.analytics.google.id
  - content_for :on_ready do
    :plain
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '#{Rails.application.config.analytics.google.id}']);
      _gaq.push(['_trackPageview']);
      $(document).on('page:change', function(){
        //_gaq.push(['_trackPageview'])
        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);
      });

Add async code from google dev console
Add async code from google dev console
