<script>
//
window.dataLayer = window.dataLayer || [];
//
{% if dataLayer is defined %}{% for key, value in dataLayer %}
{% if key is numeric %}
dataLayer.push({{ value | json_encode | raw }});
{% else %}
dataLayer.push({"{{ key }}": {{ value | json_encode | raw }}});
{% endif %}
{% endfor %}{% endif %}
</script>