{% load ocyan_main %}{% if cookie_jar.script_location == "footer" and cookie_jar.settings.google_analytics_4 and cookie_jar.analytical.is_allowed %}
    {% include "cookie_jar/consent_code.html" %}
    <script async src="https://www.googletagmanager.com/gtag/js?id={{ cookie_jar.settings.google_analytics_4 }}"></script>
    <script nonce="{% nonce %}">
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', '{{ cookie_jar.settings.google_analytics_4 }}');
    </script>
        
{% endif %}
