!!!
%html{lang: I18n.locale}
  %head
    %meta{charset: "utf-8"}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1, shrink-to-fit=no"}
    %meta{"http-equiv": "x-ua-compatible", content: "ie=edge"}
    %meta{:name => "description", :content => "Participatory budgeting"}
    %meta{:name => "keywords", :content => "open budget participatory budgeting"}
    %meta{:property => "og:title", :content => "OpenBudgets"}
    %meta{:property => "og:description", :content => "Participatory budgeting"}
    %title= _('OpenBudgets')
    = csrf_meta_tags
    = stylesheet_link_tag    'application', media: 'all'
    = javascript_include_tag 'application'
  %body{ class: (scope.blank? ? 'voting' : scope) + ' ' + controller.controller_name + ' ' + controller.action_name }
    .wrapper
      = render 'partials/header'
      %main.main-container{ role: 'main' }
        = render 'partials/alerts'
        = yield
    = render 'partials/footer'
!!!
%html{lang: I18n.locale}
  %head
    %meta{charset: "utf-8"}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1, shrink-to-fit=no"}
    %meta{"http-equiv": "x-ua-compatible", content: "ie=edge"}
    %meta{:name => "description", :content => "Participatory budgeting"}
    %meta{:name => "keywords", :content => "open budget participatory budgeting"}
    %meta{:property => "og:title", :content => "OpenBudgets"}
    %meta{:property => "og:description", :content => "Participatory budgeting"}
    %title= _('OpenBudgets')
    = csrf_meta_tags
    = stylesheet_link_tag    'application', media: 'all'
    = javascript_include_tag 'application'
    - if Rails.env.production? and ENV['ANALYTICS_ID']
      :javascript
        (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','https://www.google-analytics.com/analytics.js','ga');
         ga('create', '#{ENV['ANALYTICS_ID']}', 'auto');
         ga('send', 'pageview');
  %body{ class: (scope.blank? ? 'voting' : scope) + ' ' + controller.controller_name + ' ' + controller.action_name }
    .wrapper
      = render 'partials/header'
      %main.main-container{ role: 'main' }
        = render 'partials/alerts'
        = yield
    = render 'partials/footer'
Add support for Google Analytics tracking script
Add support for Google Analytics tracking script

Add support to optionally include Google Analytics script (#37):

* add support for optional analytics script