{% extends "!base.html" %}
{% block extrahead %}

  {{ super() }}

  {%- if analytics_id %}
  <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id={{ analytics_id }}"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());

        gtag('config', '{{ analytics_id }}');
    </script>
  {% endif -%}

{% endblock %}
