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