<script src="{{site.baseurl}}{{ site.assets_base_url }}js/main.js"></script>
{% if page.custom_js %}
  {% for js_file in page.custom_js %}
  <script src='{{site.baseurl}}/assets/js/{{ js_file }}.js' type="text/javascript"></script>
  {% endfor %}
{% elsif layout.custom_js %}
  {% for js_file in layout.custom_js %}
    <script src='{{site.baseurl}}/assets/js/{{ js_file }}.js' type="text/javascript"></script>
  {% endfor %}
{% endif %}

<!-- Add here more: Google Analytics etc. -->
{% if site.ga_tracker %}

<script>
  window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) }; ga.l = +new Date;
  ga('create', '{{ site.ga_tracker }}', 'auto');
  ga('require', 'eventTracker');
  ga('require', 'maxScrollTracker');
  ga('require', 'outboundFormTracker');
  ga('require', 'outboundLinkTracker');
  ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<script async src="https://cdnjs.cloudflare.com/ajax/libs/autotrack/2.4.1/autotrack.js"></script>

<script src="{{site.baseurl}}{{ site.assets_base_url }}js/cookie.js" async></script>

{% endif %}
