{% set topDimensions = [] %}
{% import 'macros.twig' as piwik %}

{% for element in topDimension %}
    {% set goal_nb_conversion=element.nb_conversions %}
    {% set goal_conversion_rate=element.conversion_rate %}

    {% set newElement -%}
    <span class="goalTopElement" title="{{ 'Goals_Conversions'|translate("<b>"~goal_nb_conversion~"</b>")|raw }},
        {{ 'Goals_ConversionRate'|translate("<b>"~goal_conversion_rate~"</b>")|raw }}">
        {{- element.name|rawSafeDecoded -}}
        {{- piwik.logoHtml(element.metadata, element.name)|trim|raw -}}
    </span>
    {%- endset %}

    {% set topDimensions = topDimensions|merge([newElement|trim]) %}
{% endfor %}

{{ topDimensions|default([])|andListing|raw }}
