{% endblock main%}
{% block scripts %}
{{ super() }}
{% endblock scripts %}
{% block ga_page_view %}
// 1. Send product and impression data with pageview.
{% for product in products %}
{% if product.__name__ == 'product.template' %}
{# the product could also template, in which case use the first variant #}
{% set product = product.products_displayed_on_eshop[0] %}
{% endif %}
ga('ec:addImpression', {{ product.ga_product_data(list=node.name, position=loop.index)|tojson|safe }});
{% endfor %}
{% endblock ga_page_view %}