<!DOCTYPE html>
<html>

  {% include head.html %}

  <body data-spy="scroll" data-target="#navbar">

    <header class="header">
      <div class="container">
        {% include header.html %}
      </div>
    </header>

    <div class="container">
      {{ content }}
    </div>

    <footer class="footer">
      <div class="container">
        {% include footer.html %}
      </div>
    </footer>

  </body>

  <script>
    (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', 'UA-71221156-1', 'auto');
    ga('send', 'pageview');

  </script>

</html>

<!DOCTYPE html>
<html>

  {% include head.html %}

  <body data-spy="scroll" data-target="#navbar">

    <header class="header">
      <div class="container">
        {% include header.html %}
      </div>
    </header>

    <div class="container">
      {{ content }}
    </div>

    <footer class="footer">
      <div class="container">
        {% include footer.html %}
      </div>
    </footer>

    <script>
      (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', 'UA-71221156-1', 'auto');
      ga('send', 'pageview');

    </script>
    
  </body>

</html>

Move google analytics to body
Move google analytics to body
