{% if not isWidget %}
<div class="row">
    <div class="col-md-6">
{% endif %}

        <div class="sparkline">
            {{ sparkline(urlSparklineNbVisits)|raw }}
            {{ 'General_NVisits'|translate("<strong>"~nbVisits|number~"</strong>")|raw }}{% if displayUniqueVisitors %},
                {{ 'VisitsSummary_NbUniqueVisitors'|translate("<strong>"~nbUniqVisitors|number~"</strong>")|raw }}{% endif %}
        </div>
        {% if nbUsers > 0 %}
            {# Most of users will not have used `setUserId` so this would be confusingly zero #}
            <div class="sparkline">
                {{ sparkline(urlSparklineNbUsers)|raw }}
                {{ 'General_NUsers'|translate("<strong>"~nbUsers|number~"</strong>")|raw }}
            </div>
        {% endif %}
        <div class="sparkline">
            {{ sparkline(urlSparklineAvgVisitDuration)|raw }}
            {% set averageVisitDuration=averageVisitDuration|sumtime %}
            {{ 'VisitsSummary_AverageVisitDuration'|translate("<strong>"~averageVisitDuration~"</strong>")|raw }}
        </div>
        <div class="sparkline">
            {{ sparkline(urlSparklineBounceRate)|raw }}
            {{ 'VisitsSummary_NbVisitsBounced'|translate("<strong>"~bounceRate|percent~"</strong>")|raw }}
        </div>
        <div class="sparkline">
            {{ sparkline(urlSparklineActionsPerVisit)|raw }}
            {{ 'VisitsSummary_NbActionsPerVisit'|translate("<strong>"~nbActionsPerVisit|number(1)~"</strong>")|raw }}
        </div>
        {% if showActionsPluginReports|default(false) %}
        <div class="sparkline">
            {{ sparkline(urlSparklineAvgGenerationTime)|raw }}
            {% set averageGenerationTime=averageGenerationTime|sumtime %}
            {{ 'VisitsSummary_AverageGenerationTime'|translate("<strong>"~averageGenerationTime~"</strong>")|raw }}
        </div>
        {% endif %}

{% if not isWidget %}
    </div>
    <div class="col-md-6">
{% endif %}

        {% if showActionsPluginReports|default(false) %}
            {% if showOnlyActions %}
                <div class="sparkline">
                    {{ sparkline(urlSparklineNbActions)|raw }}
                    {{ 'VisitsSummary_NbActionsDescription'|translate("<strong>"~nbActions|number~"</strong>")|raw }}
                </div>
            {% else %}
                <div class="sparkline">
                    {{ sparkline(urlSparklineNbPageviews)|raw }}
                    {{ 'VisitsSummary_NbPageviewsDescription'|translate("<strong>"~nbPageviews|number~"</strong>")|trim|raw }},
                    {{ 'VisitsSummary_NbUniquePageviewsDescription'|translate("<strong>"~nbUniquePageviews|number~"</strong>")|raw }}
                </div>
                {% if displaySiteSearch %}
                    <div class="sparkline">
                        {{ sparkline(urlSparklineNbSearches)|raw }}
                        {{ 'VisitsSummary_NbSearchesDescription'|translate("<strong>"~nbSearches|number~"</strong>")|trim|raw }},
                        {{ 'VisitsSummary_NbKeywordsDescription'|translate("<strong>"~nbKeywords|number~"</strong>")|raw }}
                    </div>
                {% endif %}
                <div class="sparkline">
                        {{ sparkline(urlSparklineNbDownloads)|raw }}
                        {{ 'VisitsSummary_NbDownloadsDescription'|translate("<strong>"~nbDownloads|number~"</strong>")|trim|raw }},
                        {{ 'VisitsSummary_NbUniqueDownloadsDescription'|translate("<strong>"~nbUniqueDownloads|number~"</strong>")|raw }}
                </div>
                <div class="sparkline">
                        {{ sparkline(urlSparklineNbOutlinks)|raw }}
                        {{ 'VisitsSummary_NbOutlinksDescription'|translate("<strong>"~nbOutlinks|number~"</strong>")|trim|raw }},
                        {{ 'VisitsSummary_NbUniqueOutlinksDescription'|translate("<strong>"~nbUniqueOutlinks|number~"</strong>")|raw }}
                </div>
                {% endif %}
        {% endif %}
        <div class="sparkline">
                {{ sparkline(urlSparklineMaxActions)|raw }}
                {{ 'VisitsSummary_MaxNbActions'|translate("<strong>"~maxActions|number~"</strong>")|raw }}
        </div>

        {{ postEvent('Template.VisitsSummaryOverviewSparklines') }}

{% if not isWidget %}
    </div>
</div>
{% endif %}

{% include "_sparklineFooter.twig" %}

