{% set previousAction = false %} {% for action in actionDetails %} {% set customVariablesTooltip %} {% if action.customVariables is defined %} {{ 'CustomVariables_CustomVariables'|translate }}: {% for id,customVariable in action.customVariables %} {% set name = 'customVariablePageName' ~ id %} {% set value = 'customVariablePageValue' ~ id %} - {{ customVariable[name]|raw }} {% if customVariable[value]|length > 0 %} = {{ customVariable[value]|raw }}{% endif %} {# line break above is important #} {% endfor %} {% endif %} {% endset %}
  • {% if action.type == 'ecommerceOrder' or action.type == 'ecommerceAbandonedCart' %} {# Ecommerce Abandoned Cart / Ecommerce Order #} {% if action.type == 'ecommerceOrder' %} {{ 'Goals_EcommerceOrder'|translate }} ({{ action.orderId }}) {% else %} {{'Goals_AbandonedCart'|translate}} {# TODO: would be nice to have the icons Orders / Cart in the ecommerce log footer #} {% endif %}

    {% if action.type == 'ecommerceOrder' %} {# spacing is important for tooltip to look nice #} {% set ecommerceOrderTooltip %}{{ 'General_ColumnRevenue'|translate }}: {{ action.revenue|money(clientSideParameters.idSite)|raw }} {% if action.revenueSubTotal is not empty %} - {{ 'General_Subtotal'|translate }}: {{ action.revenueSubTotal|money(clientSideParameters.idSite)|raw }}{% endif %} {% if action.revenueTax is not empty %} - {{ 'General_Tax'|translate }}: {{ action.revenueTax|money(clientSideParameters.idSite)|raw }}{% endif %} {% if action.revenueShipping is not empty %} - {{ 'General_Shipping'|translate }}: {{ action.revenueShipping|money(clientSideParameters.idSite)|raw }}{% endif %} {% if action.revenueDiscount is not empty %} - {{ 'General_Discount'|translate }}: {{ action.revenueDiscount|money(clientSideParameters.idSite)|raw }}{% endif %} {% endset %} {{ 'General_ColumnRevenue'|translate }}: {% else %} {% set revenueLeft %}{{ 'General_ColumnRevenue'|translate }}{% endset %} {{ 'Goals_LeftInCart'|translate(revenueLeft) }}: {% endif %} {{ action.revenue|money(clientSideParameters.idSite)|raw }} {% if action.type == 'ecommerceOrder' %} {% endif %}, {{ 'General_Quantity'|translate }}: {{ action.items }} {# Ecommerce items in Cart/Order #} {% if action.itemDetails is not empty %}

    {% endif %}

    {% elseif action.goalName is not defined%} {# Page view / Download / Outlink / Event #} {% if action.pageTitle|default(false) is not empty %} {{ action.pageTitle|rawSafeDecoded }} {% endif %} {% if action.siteSearchKeyword is defined %} {% if action.type == 'search' %} {% endif %} {{ action.siteSearchKeyword }} {% endif %} {% if action.eventCategory|default(false) is not empty %} {{ action.eventCategory|rawSafeDecoded }} - {{ action.eventAction|rawSafeDecoded }} {% if action.eventName is defined %}- {{ action.eventName|rawSafeDecoded }}{% endif %} {% if action.eventValue is defined %}[{{ action.eventValue }}]{% endif %} {% endif %} {% if action.url is not empty %} {% if action.type == 'action' and action.pageTitle|default(false) is not empty %}

    {% endif %} {% if action.type == 'download' or action.type == 'outlink' %} {% endif %} {% if action.eventCategory|default(false) is not empty and previousAction.url|default(false) == action.url %} {# For events, do not show (url) if the Event URL is the same as the URL last displayed #} {% else %} {{ action.url }} {% endif %} {% if action.type == 'action' and action.pageTitle|default(false) is not empty %}

    {% endif %} {% elseif action.type != 'search' and action.type != 'event' %}

    {{ clientSideParameters.pageUrlNotDefined }}

    {% endif %} {% else %} {# Goal conversion #} {{ action.goalName }} {% if action.revenue > 0 %}, {{ 'General_ColumnRevenue'|translate }}: {{ action.revenue|money(clientSideParameters.idSite)|raw }} {% endif %} {% endif %}
  • {% set previousAction = action %} {% endfor %}