merge
This commit is contained in:
commit
046a724272
4209 changed files with 1186656 additions and 0 deletions
121
www/analytics/plugins/Live/templates/_actionsList.twig
Normal file
121
www/analytics/plugins/Live/templates/_actionsList.twig
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{% 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 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{% if not clientSideParameters.filterEcommerce or action.type == 'ecommerceOrder' or action.type == 'ecommerceAbandonedCart' %}
|
||||
<li class="{% if action.goalName is defined %}goal{% else %}action{% endif %}"
|
||||
title="{{ action.serverTimePretty }}{% if action.url is defined and action.url|trim|length %}
|
||||
|
||||
{{ action.url }}{% endif %}{% if customVariablesTooltip|trim|length %}
|
||||
|
||||
{{ customVariablesTooltip|trim }}{% endif -%}
|
||||
{%- if action.generationTime is defined %}
|
||||
|
||||
{{ 'General_ColumnGenerationTime'|translate }}: {{ action.generationTime|raw }}{% endif %}
|
||||
{%- if action.timeSpentPretty is defined %}
|
||||
|
||||
{{ 'General_TimeOnPage'|translate }}: {{ action.timeSpentPretty|raw }}{% endif -%}">
|
||||
<div>
|
||||
{% if action.type == 'ecommerceOrder' or action.type == 'ecommerceAbandonedCart' %}
|
||||
{# Ecommerce Abandoned Cart / Ecommerce Order #}
|
||||
<img src="{{ action.icon }}"/>
|
||||
{% if action.type == 'ecommerceOrder' %}
|
||||
<strong>{{ 'Goals_EcommerceOrder'|translate }}</strong>
|
||||
<span style='color:#666;'>({{ action.orderId }})</span>
|
||||
{% else %}
|
||||
<strong>{{'Goals_AbandonedCart'|translate}}</strong>
|
||||
|
||||
{# TODO: would be nice to have the icons Orders / Cart in the ecommerce log footer #}
|
||||
{% endif %}
|
||||
<p>
|
||||
<span {% if not isWidget %}style='margin-left:20px;'{% 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 %}
|
||||
<abbr title="{{ ecommerceOrderTooltip }}">{{ 'General_ColumnRevenue'|translate }}:
|
||||
{% else %}
|
||||
{% set revenueLeft %}{{ 'General_ColumnRevenue'|translate }}{% endset %}
|
||||
{{ 'Goals_LeftInCart'|translate(revenueLeft) }}:
|
||||
{% endif %}
|
||||
<strong>{{ action.revenue|money(clientSideParameters.idSite)|raw }}</strong>
|
||||
{% if action.type == 'ecommerceOrder' %}
|
||||
</abbr>
|
||||
{% endif %}, {{ 'General_Quantity'|translate }}: {{ action.items }}
|
||||
|
||||
{# Ecommerce items in Cart/Order #}
|
||||
{% if action.itemDetails is not empty %}
|
||||
<ul style='list-style:square;margin-left:{% if isWidget %}15{% else %}50{% endif %}px;'>
|
||||
{% for product in action.itemDetails %}
|
||||
<li>
|
||||
{{ product.itemSKU }}{% if product.itemName is not empty %}: {{ product.itemName }}{% endif %}
|
||||
{% if product.itemCategory is not empty %} ({{ product.itemCategory }}){% endif %}
|
||||
,
|
||||
{{ 'General_Quantity'|translate }}: {{ product.quantity }},
|
||||
{{ 'General_Price'|translate }}: {{ product.price|money(clientSideParameters.idSite)|raw }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</span>
|
||||
</p>
|
||||
{% elseif action.goalName is not defined%}
|
||||
{# Page view / Download / Outlink / Event #}
|
||||
{% if action.pageTitle|default(false) is not empty %}
|
||||
<span class="truncated-text-line">{{ action.pageTitle }}</span>
|
||||
{% endif %}
|
||||
{% if action.siteSearchKeyword is defined %}
|
||||
{% if action.type == 'search' %}
|
||||
<img src='{{ action.icon }}' title='{{ 'Actions_SubmenuSitesearch'|translate }}' class="action-list-action-icon">
|
||||
{% endif %}
|
||||
<span class="truncated-text-line">{{ action.siteSearchKeyword }}</span>
|
||||
{% endif %}
|
||||
{% if action.eventCategory|default(false) is not empty %}
|
||||
<img src='{{ action.icon }}' title='{{ 'Events_Event'|translate }}' class="action-list-action-icon">
|
||||
<span class="truncated-text-line">{{ action.eventCategory }} - {{ action.eventAction }} {% if action.eventName is defined %}- {{ action.eventName }}{% endif %} {% if action.eventValue is defined %}- {{ action.eventValue }}{% endif %}</span>
|
||||
{% endif %}
|
||||
{% if action.url is not empty %}
|
||||
{% if action.type == 'action' and action.pageTitle|default(false) is not empty %}<p>{% endif %}
|
||||
{% if action.type == 'download' or action.type == 'outlink' %}
|
||||
<img src='{{ action.icon }}' class="action-list-action-icon">
|
||||
{% endif %}
|
||||
<a href="{{ action.url }}" target="_blank" class="{% if action.eventCategory|default(false) is empty %}action-list-url{# don't put URL on new line for events #}{% endif %} truncated-text-line"
|
||||
{% if overrideLinkStyle is not defined or overrideLinkStyle %}style="{% if action.type=='action' and action.pageTitle|default(false) is not empty %}margin-left: 9px;{% endif %}text-decoration:underline;"{% endif %}>
|
||||
{% if action.eventCategory|default(false) is not empty %}
|
||||
(url)
|
||||
{% else %}
|
||||
{{ action.url }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if action.type == 'action' and action.pageTitle|default(false) is not empty %}</p>{% endif %}
|
||||
{% elseif action.type != 'search' and action.type != 'event' %}
|
||||
<p>
|
||||
<span style="margin-left: 9px;">{{ clientSideParameters.pageUrlNotDefined }}</span>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{# Goal conversion #}
|
||||
<img src="{{ action.icon }}" />
|
||||
<strong>{{ action.goalName }}</strong>
|
||||
{% if action.revenue > 0 %}, {{ 'General_ColumnRevenue'|translate }}:
|
||||
<strong>{{ action.revenue|money(clientSideParameters.idSite)|raw }}</strong>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
{% set displayVisitorsInOwnColumn = (isWidget ? false : true) %}
|
||||
{% set displayReferrersInOwnColumn = (clientSideParameters.smallWidth ? false : true) %}
|
||||
<table class="dataTable" cellspacing="0" width="100%" style="width:100%;table-layout:fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="display:none;"></th>
|
||||
<th id="label" class="sortable label" style="cursor: auto;width:190px;" width="190px">
|
||||
<div id="thDIV">{{ 'General_Date'|translate }}</div>
|
||||
</th>
|
||||
{% if displayVisitorsInOwnColumn %}
|
||||
<th id="label" class="sortable label" style="cursor: auto;width:225px;" width="225px">
|
||||
<div id="thDIV">{{ 'General_Visitors'|translate }}</div>
|
||||
</th>
|
||||
{% endif %}
|
||||
{% if displayReferrersInOwnColumn %}
|
||||
<th id="label" class="sortable label" style="cursor: auto;width:230px;" width="230px">
|
||||
<div id="thDIV">{{ 'Live_Referrer_URL'|translate }}</div>
|
||||
</th>
|
||||
{% endif %}
|
||||
<th id="label" class="sortable label" style="cursor: auto;">
|
||||
<div id="thDIV">{{ 'General_ColumnNbActions'|translate }}</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set cycleIndex=0 %}
|
||||
{% for visitor in dataTable.getRows() %}
|
||||
{% set breakBeforeVisitorRank = (visitor.getColumn('visitEcommerceStatusIcon') and visitor.getColumn('visitorTypeIcon')) ? true : false %}
|
||||
{% set visitorColumnContent %}
|
||||
<img src="{{ visitor.getColumn('countryFlag') }}" title="{{ visitor.getColumn('location') }}, Provider {{ visitor.getColumn('providerName') }}"/>
|
||||
|
||||
{% if visitor.getColumn('plugins') %}
|
||||
<img src="{{ visitor.getColumn('browserIcon') }}" title="{{ 'UserSettings_BrowserWithPluginsEnabled'|translate(visitor.getColumn('browserName'),visitor.getColumn('plugins')) }}"/>
|
||||
{% else %}
|
||||
<img src="{{ visitor.getColumn('browserIcon') }}" title="{{ 'UserSettings_BrowserWithNoPluginsEnabled'|translate(visitor.getColumn('browserName')) }}"/>
|
||||
{% endif %}
|
||||
|
||||
<img src="{{ visitor.getColumn('operatingSystemIcon') }}"
|
||||
title="{{ visitor.getColumn('operatingSystem') }}, {{ visitor.getColumn('resolution') }} ({{ visitor.getColumn('screenType') }})"/>
|
||||
{% if visitor.getColumn('visitorTypeIcon') %}
|
||||
-
|
||||
<img src="{{ visitor.getColumn('visitorTypeIcon') }}"
|
||||
title="{{ 'General_ReturningVisitor'|translate }} - {{ 'General_NVisits'|translate(visitor.getColumn('visitCount')) }}"/>
|
||||
{% endif %}
|
||||
{% if not displayVisitorsInOwnColumn or breakBeforeVisitorRank %}<br/><br />{% endif %}
|
||||
{% if visitor.getColumn('visitConverted') %}
|
||||
<span title="{{ 'General_VisitConvertedNGoals'|translate(visitor.getColumn('goalConversions')) }}" class='visitorRank'
|
||||
{% if not displayVisitorsInOwnColumn or breakBeforeVisitorRank %}style="margin-left:0;"{% endif %}>
|
||||
<img src="{{ visitor.getColumn('visitConvertedIcon') }}"/>
|
||||
<span class='hash'>#</span>
|
||||
{{ visitor.getColumn('goalConversions') }}
|
||||
{% if visitor.getColumn('visitEcommerceStatusIcon') %}
|
||||
-
|
||||
<img src="{{ visitor.getColumn('visitEcommerceStatusIcon') }}" title="{{ visitor.getColumn('visitEcommerceStatus') }}"/>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if not displayVisitorsInOwnColumn %}<br/><br />{% endif %}
|
||||
{% if displayVisitorsInOwnColumn %}
|
||||
{% if visitor.getColumn('pluginsIcons')|length > 0 %}
|
||||
<hr/>
|
||||
{{ 'General_Plugins'|translate }}:
|
||||
{% for pluginIcon in visitor.getColumn('pluginsIcons') %}
|
||||
<img src="{{ pluginIcon.pluginIcon }}" title="{{ pluginIcon.pluginName|capitalize(true) }}" alt="{{ pluginIcon.pluginName|capitalize(true) }}"/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% set referrerColumnContent %}
|
||||
<div class="referrer">
|
||||
{% if visitor.getColumn('referrerType') == 'website' %}
|
||||
{{ 'Referrers_ColumnWebsite'|translate }}:
|
||||
<a href="{{ visitor.getColumn('referrerUrl') }}" target="_blank" title="{{ visitor.getColumn('referrerUrl') }}"
|
||||
style="text-decoration:underline;">
|
||||
{{ visitor.getColumn('referrerName') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if visitor.getColumn('referrerType') == 'campaign' %}
|
||||
{{ 'Referrers_ColumnCampaign'|translate }}
|
||||
<br/>
|
||||
{{ visitor.getColumn('referrerName') }}
|
||||
{% if visitor.getColumn('referrerKeyword') is not empty %} - {{ visitor.getColumn('referrerKeyword') }}{% endif %}
|
||||
{% endif %}
|
||||
{% if visitor.getColumn('referrerType') == 'search' %}
|
||||
{%- set keywordNotDefined = 'General_NotDefined'|translate('General_ColumnKeyword'|translate) -%}
|
||||
{%- set showKeyword = visitor.getColumn('referrerKeyword') is not empty and visitor.getColumn('referrerKeyword') != keywordNotDefined -%}
|
||||
{% if visitor.getColumn('searchEngineIcon') %}
|
||||
<img src="{{ visitor.getColumn('searchEngineIcon') }}" alt="{{ visitor.getColumn('referrerName') }}"/>
|
||||
{% endif %}
|
||||
<span {% if not showKeyword %}title="{{ keywordNotDefined }}"{% endif %}>{{ visitor.getColumn('referrerName') }}</span>
|
||||
{% if showKeyword %}{{ 'Referrers_Keywords'|translate }}:
|
||||
<br/>
|
||||
<a href="{{ visitor.getColumn('referrerUrl') }}" target="_blank" style="text-decoration:underline;">
|
||||
"{{ visitor.getColumn('referrerKeyword') }}"</a>
|
||||
{% endif %}
|
||||
{% set keyword %}{{ visitor.getColumn('referrerKeyword') }}{% endset %}
|
||||
{% set searchName %}{{ visitor.getColumn('referrerName') }}{% endset %}
|
||||
{% set position %}#{{ visitor.getColumn('referrerKeywordPosition') }}{% endset %}
|
||||
{% if visitor.getColumn('referrerKeywordPosition') %}
|
||||
<span title='{{ 'Live_KeywordRankedOnSearchResultForThisVisitor'|translate(keyword,position,searchName) }}' class='visitorRank'>
|
||||
<span class='hash'>#</span>
|
||||
{{ visitor.getColumn('referrerKeywordPosition') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if visitor.getColumn('referrerType') == 'direct' %}{{ 'Referrers_DirectEntry'|translate }}{% endif %}
|
||||
</div>
|
||||
{% endset %}
|
||||
|
||||
|
||||
{% set visitorRow %}
|
||||
<tr class="label{{ cycle(['odd','even'], cycleIndex) }}">
|
||||
{% set cycleIndex=cycleIndex+1 %}
|
||||
<td style="display:none;"></td>
|
||||
<td class="label">
|
||||
<strong title="{% if visitor.getColumn('visitorType')=='new' %}{{ 'General_NewVisitor'|translate }}{% else %}{{ 'Live_VisitorsLastVisit'|translate(visitor.getColumn('daysSinceLastVisit')) }}{% endif %}">
|
||||
{{ visitor.getColumn('serverDatePrettyFirstAction') }}
|
||||
{% if isWidget %}<br/>{% else %}-{% endif %} {{ visitor.getColumn('serverTimePrettyFirstAction') }}</strong>
|
||||
{% if visitor.getColumn('visitIp') is not empty %}
|
||||
<br/>
|
||||
<span title="{% if visitor.getColumn('visitorId') is not empty %}{{ 'General_VisitorID'|translate }}: {{ visitor.getColumn('visitorId') }}{% endif -%}
|
||||
{%- if visitor.getColumn('latitude') or visitor.getColumn('longitude') %}
|
||||
|
||||
{{ visitor.getColumn('location') }}
|
||||
|
||||
GPS (lat/long): {{ visitor.getColumn('latitude') }},{{ visitor.getColumn('longitude') }}{% endif %}">
|
||||
IP: {{ visitor.getColumn('visitIp') }}</span>{% endif %}
|
||||
|
||||
{% if visitor.getColumn('provider') and visitor.getColumn('providerName')!='IP' %}
|
||||
<br/>
|
||||
{{ 'Provider_ColumnProvider'|translate }}:
|
||||
<a href="{{ visitor.getColumn('providerUrl') }}" target="_blank" title="{{ visitor.getColumn('providerUrl') }}" style="text-decoration:underline;">
|
||||
{{ visitor.getColumn('providerName') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if visitor.getColumn('customVariables') %}
|
||||
<br/>
|
||||
{% for id,customVariable in visitor.getColumn('customVariables') %}
|
||||
{% set name='customVariableName' ~ id %}
|
||||
{% set value='customVariableValue' ~ id %}
|
||||
<br/>
|
||||
<acronym title="{{ 'CustomVariables_CustomVariables'|translate }} (index {{ id }})">
|
||||
{{ customVariable[name]|truncate(30) }}
|
||||
</acronym>
|
||||
{% if customVariable[value]|length > 0 %}: {{ customVariable[value]|truncate(50) }}{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if not displayVisitorsInOwnColumn %}
|
||||
<br/>
|
||||
{{ visitorColumnContent }}
|
||||
{% endif %}
|
||||
{% if not displayReferrersInOwnColumn %}
|
||||
<br/>
|
||||
{{ referrerColumnContent }}
|
||||
{% endif %}
|
||||
</td>
|
||||
|
||||
{% if displayVisitorsInOwnColumn %}
|
||||
<td class="label">
|
||||
{{ visitorColumnContent }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
{% if displayReferrersInOwnColumn %}
|
||||
<td class="column">
|
||||
{{ referrerColumnContent }}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="column {% if visitor.getColumn('visitConverted') and not isWidget %}highlightField{% endif %}">
|
||||
<div class="visitor-log-page-list">
|
||||
{% if visitor.getColumn('visitorId') is not empty %}
|
||||
<a class="visitor-log-visitor-profile-link" title="{{ 'Live_ViewVisitorProfile'|translate }}" data-visitor-id="{{ visitor.getColumn("visitorId") }}">
|
||||
<img src="plugins/Live/images/visitorProfileLaunch.png"/> <span>{{ 'Live_ViewVisitorProfile'|translate }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
<strong>
|
||||
{{ visitor.getColumn('actionDetails')|length }}
|
||||
{% if visitor.getColumn('actionDetails')|length <= 1 %}
|
||||
{{ 'General_Action'|translate }}
|
||||
{% else %}
|
||||
{{ 'General_Actions'|translate }}
|
||||
{% endif %}
|
||||
{% if visitor.getColumn('visitDuration') > 0 %}- {{ visitor.getColumn('visitDurationPretty')|raw }}{% endif %}
|
||||
</strong>
|
||||
<br/>
|
||||
<ol class='visitorLog'>
|
||||
{% include "@Live/_actionsList.twig" with {'actionDetails': visitor.getColumn('actionDetails')} %}
|
||||
</ol>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endset %}
|
||||
|
||||
{% if not clientSideParameters.filterEcommerce or visitor.getMetadata('hasEcommerce') %}
|
||||
{{ visitorRow }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
29
www/analytics/plugins/Live/templates/_totalVisitors.twig
Normal file
29
www/analytics/plugins/Live/templates/_totalVisitors.twig
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<div id="visitsTotal">
|
||||
<table class="dataTable" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="label" class="sortable label" style="cursor: auto;">
|
||||
<div id="thDIV">{{ 'General_Date'|translate }}</div>
|
||||
</th>
|
||||
<th id="label" class="sortable label" style="cursor: auto;">
|
||||
<div id="thDIV">{{ 'General_ColumnNbVisits'|translate }}</div>
|
||||
</th>
|
||||
<th id="label" class="sortable label" style="cursor: auto;">
|
||||
<div id="thDIV">{{ 'General_ColumnPageviews'|translate }}</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="">
|
||||
<td class="column columnodd">{{ 'Live_LastHours'|translate(24) }}</td>
|
||||
<td class="column columnodd">{{ visitorsCountToday }}</td>
|
||||
<td class="column columnodd">{{ pisToday }}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td class="column columnodd">{{ 'Live_LastMinutes'|translate(30) }}</td>
|
||||
<td class="column columnodd">{{ visitorsCountHalfHour }}</td>
|
||||
<td class="column columnodd">{{ pisHalfhour }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -0,0 +1 @@
|
|||
{% include "@Live/_totalVisitors.twig" %}
|
||||
144
www/analytics/plugins/Live/templates/getLastVisitsStart.twig
Normal file
144
www/analytics/plugins/Live/templates/getLastVisitsStart.twig
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
{# some users view thousands of pages which can crash the browser viewing Live! #}
|
||||
{% set maxPagesDisplayedByVisitor=100 %}
|
||||
|
||||
<ul id='visitsLive'>
|
||||
{% for visitor in visitors %}
|
||||
<li id="{{ visitor.idVisit }}" class="visit">
|
||||
<div style="display:none;" class="idvisit">{{ visitor.idVisit }}</div>
|
||||
<div title="{{ visitor.actionDetails|length }} {{ 'General_Actions'|translate }}" class="datetime">
|
||||
<span style="display:none;" class="serverTimestamp">{{ visitor.serverTimestamp|raw }}</span>
|
||||
{{ visitor.serverDatePretty }} - {{ visitor.serverTimePretty }} {% if visitor.visitDuration > 0 %}<em>({{ visitor.visitDurationPretty|raw }})</em>{% endif %}
|
||||
<img src="{{ visitor.countryFlag }}" title="{{ visitor.location }}, {{ 'Provider_ColumnProvider'|translate }} {{ visitor.providerName }}"/>
|
||||
<img src="{{ visitor.browserIcon }}" title="{{ visitor.browserName }}, {{ 'General_Plugins'|translate }}: {{ visitor.plugins }}"/>
|
||||
<img src="{{ visitor.operatingSystemIcon }}" title="{{ visitor.operatingSystem }}, {{ visitor.resolution }}"/>
|
||||
|
||||
{% if visitor.visitConverted %}
|
||||
<span title="{{ 'General_VisitConvertedNGoals'|translate(visitor.goalConversions) }}" class='visitorRank'>
|
||||
<img src="{{ visitor.visitConvertedIcon }}" />
|
||||
<span class='hash'>#</span>
|
||||
{{ visitor.goalConversions }}
|
||||
{% if visitor.visitEcommerceStatusIcon %}
|
||||
-
|
||||
<img src="{{ visitor.visitEcommerceStatusIcon }}" title="{{ visitor.visitEcommerceStatus }}"/>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if visitor.visitorTypeIcon %}
|
||||
- <img src="{{ visitor.visitorTypeIcon }}" title="{{ 'General_ReturningVisitor'|translate }}"/>
|
||||
{% endif %}
|
||||
{% if visitor.visitorId|default(false) is not empty %}
|
||||
<a class="visits-live-launch-visitor-profile rightLink" title="{{ 'Live_ViewVisitorProfile'|translate }}" data-visitor-id="{{ visitor.visitorId }}">
|
||||
<img src="plugins/Live/images/visitorProfileLaunch.png"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if visitor.visitIp %}- <span title="{% if visitor.visitorId is not empty %}{{ 'General_VisitorID'|translate }}: {{ visitor.visitorId }}{% endif %}">
|
||||
IP: {{ visitor.visitIp }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<!--<div class="settings"></div>-->
|
||||
<div class="referrer">
|
||||
{% if visitor.referrerType != 'direct' %}
|
||||
{{ 'General_FromReferrer'|translate }}
|
||||
{% if visitor.referrerUrl is not empty %}
|
||||
<a href="{{ visitor.referrerUrl }}" target="_blank">
|
||||
{% endif %}
|
||||
{% if visitor.searchEngineIcon is defined %}
|
||||
<img src="{{ visitor.searchEngineIcon }}" />
|
||||
{% endif %}
|
||||
{{ visitor.referrerName }}
|
||||
{% if visitor.referrerUrl is not empty %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if visitor.referrerKeyword is not empty %} - "{{ visitor.referrerKeyword }}"{% endif %}
|
||||
{% set keyword %}{{ visitor.referrerKeyword }}{% endset %}
|
||||
{% set searchName %}{{ visitor.referrerName }}{% endset %}
|
||||
{% set position %}#{{ visitor.referrerKeywordPosition}}{% endset %}
|
||||
{% if visitor.referrerKeywordPosition is not empty %}
|
||||
<span title='{{ 'Live_KeywordRankedOnSearchResultForThisVisitor'|translate(keyword,position,searchName) }}' class='visitorRank'>
|
||||
<span class='hash'>#</span> {{ visitor.referrerKeywordPosition }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ 'Referrers_DirectEntry'|translate }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="{{ visitor.idVisit }}_actions" class="settings">
|
||||
<span class="pagesTitle" title="{{ visitor.actionDetails|length }} {{ 'General_Actions'|translate }}">{{ 'General_Pages'|translate }}:</span>
|
||||
{% set col = 0 %}
|
||||
{% for action in visitor.actionDetails %}
|
||||
{% if loop.index <= maxPagesDisplayedByVisitor %}
|
||||
{% if action.type == 'ecommerceOrder' or action.type == 'ecommerceAbandonedCart' %}
|
||||
{% set title %}
|
||||
{% if action.type == 'ecommerceOrder' %}
|
||||
{{ 'Goals_EcommerceOrder'|translate }}
|
||||
{% else %}
|
||||
{{ 'Goals_AbandonedCart'|translate }}
|
||||
{% endif %}
|
||||
-
|
||||
{% if action.type == 'ecommerceOrder' %}
|
||||
{{ 'General_ColumnRevenue'|translate }}:
|
||||
{% else %}
|
||||
{% set revenueLeft %}
|
||||
{{ 'General_ColumnRevenue'|translate }}
|
||||
{% endset %}
|
||||
{{ 'Goals_LeftInCart'|translate(revenueLeft) }}:
|
||||
{% endif %}
|
||||
{{ action.revenue|money(idSite)|raw }} - {{ action.serverTimePretty }}
|
||||
{% if action.itemDetails is not empty %}
|
||||
{% for product in action.itemDetails %}
|
||||
# {{ product.itemSKU }}{% if product.itemName is not empty %}: {{ product.itemName }}{% endif %}{% if product.itemCategory is not empty %} ({{ product.itemCategory }}){% endif %}, {{ 'General_Quantity'|translate }}: {{ product.quantity }}, {{ 'General_Price'|translate }}: {{ product.price|money(idSite)|raw }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
<span title="{{ title }}">
|
||||
<img class='iconPadding' src="{{ action.icon }}"/>
|
||||
{% if action.type == 'ecommerceOrder' %}
|
||||
{{ 'General_ColumnRevenue'|translate }}: {{ action.revenue|money(idSite)|raw }}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% else %}
|
||||
{% set col = col + 1 %}
|
||||
{% if col >= 9 %}
|
||||
{% set col = 0 %}
|
||||
{% endif %}
|
||||
<a href="{{ action.url }}" target="_blank">
|
||||
{% if action.type == 'action' %}
|
||||
{# white spacing matters as Chrome tooltip display whitespaces #}
|
||||
{% set title %}
|
||||
{% if action.pageTitle is not empty %}{{ action.pageTitle }}{% endif %}
|
||||
|
||||
{{ action.serverTimePretty }}
|
||||
{% if action.timeSpentPretty is defined %}{{ 'General_TimeOnPage'|translate }}: {{ action.timeSpentPretty|raw }}{% endif %}
|
||||
{%- endset %}
|
||||
<img src="plugins/Live/images/file{{ col }}.png" title="{{- title -}}"/>
|
||||
{% elseif action.type == 'outlink' or action.type == 'download' %}
|
||||
<img class='iconPadding' src="{{ action.icon }}"
|
||||
title="{{ action.url }} - {{ action.serverTimePretty }}"/>
|
||||
{% elseif action.type == 'search' %}
|
||||
<img class='iconPadding' src="{{ action.icon }}"
|
||||
title="{{ 'Actions_SubmenuSitesearch'|translate }}: {{ action.siteSearchKeyword }} - {{ action.serverTimePretty }}"/>
|
||||
{% elseif action.eventCategory|default(false) is not empty %}
|
||||
<img class="iconPadding" src='{{ action.icon }}'
|
||||
title="{{ 'Events_Event'|translate }} {{ action.eventCategory }} - {{ action.eventAction }} {% if action.eventName is defined %}- {{ action.eventName }}{% endif %} {% if action.eventValue is defined %}- {{ action.eventValue }}{% endif %}"/>
|
||||
{% else %}
|
||||
<img class='iconPadding' src="{{ action.icon }}"
|
||||
title="{{ action.goalName }} - {% if action.revenue > 0 %}{{ 'General_ColumnRevenue'|translate }}: {{ action.revenue|money(idSite)|raw }} - {% endif %} {{ action.serverTimePretty }}"/>
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if visitor.actionDetails|length > maxPagesDisplayedByVisitor %}
|
||||
<em>({{ 'Live_MorePagesNotDisplayed'|translate }})</em>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$('#visitsLive').on('click', '.visits-live-launch-visitor-profile', function (e) {
|
||||
e.preventDefault();
|
||||
broadcast.propagateNewPopoverParameter('visitorProfile', $(this).attr('data-visitor-id'));
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div class='simple-realtime-visitor-widget' data-refreshAfterXSecs="{{ refreshAfterXSecs }}" data-last-minutes="{{ lastMinutes }}" data-translations="{{ translations|json_encode }}">
|
||||
<div class='simple-realtime-visitor-counter' title="{% if visitors == 1 %}{{ 'Live_NbVisitor'|translate }}{% else %}{{ 'Live_NbVisitors'|translate(visitors) }}{% endif %}">
|
||||
<div>{{ visitors }}</div>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
<div class='simple-realtime-elaboration'>
|
||||
{% set visitsMessage %}
|
||||
<span class="simple-realtime-metric" data-metric="visits">{% if visits == 1 %}{{ 'General_OneVisit'|translate }}{% else %}{{ 'General_NVisits'|translate(visits) }}{% endif %}</span>
|
||||
{% endset %}
|
||||
{% set actionsMessage %}
|
||||
<span class="simple-realtime-metric" data-metric="actions">{% if actions == 1 %}{{ 'General_OneAction'|translate }}{% else %}{{ 'VisitsSummary_NbActionsDescription'|translate(actions) }}{% endif %}</span>
|
||||
{% endset %}
|
||||
{% set minutesMessage %}
|
||||
<span class="simple-realtime-metric" data-metric="minutes">{% if lastMinutes == 1 %}{{ 'General_OneMinute'|translate }}{% else %}{{ 'General_NMinutes'|translate(lastMinutes) }}{% endif %}</span>
|
||||
{% endset %}
|
||||
|
||||
{{ 'Live_SimpleRealTimeWidget_Message'|translate(visitsMessage,actionsMessage,minutesMessage) | raw }}
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">$(document).ready(function () {require('piwik/Live').initSimpleRealtimeVisitorWidget();});</script>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{% macro customVar(id, customVariable) %}
|
||||
{% set name='customVariableName' ~ id %}
|
||||
{% set value='customVariableValue' ~ id %}
|
||||
<li><span>{{ customVariable[name]|truncate(30) }}</span>{% if customVariable[value]|length > 0 %}<strong>{{ customVariable[value]|truncate(50) }}</strong>{% endif %}</li>
|
||||
{% endmacro %}
|
||||
{% import _self as macros %}
|
||||
{% if showLocation|default(false) %}
|
||||
<div class="visitor-profile-latest-visit-loc" title="{{ visitData.location }}">
|
||||
<img src="{{ visitData.countryFlag }}"/> <span>{% if visitData.city is not empty %}{{ visitData.city }}{% else %}{{ visitData.country }}{% endif %}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="visitor-profile-latest-visit-column">
|
||||
<ul>
|
||||
<li>
|
||||
<span>{{ 'General_IP'|translate }}</span><strong {% if visitData.providerName is not empty %}title="{{ 'Provider_ColumnProvider'|translate }}: {{ visitData.providerName }}"{% endif %}>{{ visitData.visitIp }}</strong>
|
||||
</li>
|
||||
<li class="visitor-profile-id">
|
||||
<span>{{ 'General_Id'|translate|upper }}</span>
|
||||
{% if widgetizedLink is defined %}<a class="visitor-profile-widget-link" href="{{ widgetizedLink }}" target="_blank" title="{{ 'Widgetize_OpenInNewWindow'|translate }} - {{ 'Live_VisitorProfile'|translate }} {{ 'General_Id'|translate|upper }} {{ visitData.visitorId }}">{% endif %}
|
||||
<strong>{{ visitData.visitorId }}</strong>
|
||||
{% if widgetizedLink is defined %}</a>{% endif %}
|
||||
<a class="visitor-profile-export" href="{{ exportLink }}" target="_blank" title="{{ 'General_ExportThisReport'|translate }}" style="visibility:hidden">
|
||||
<img src="plugins/Zeitgeist/images/export.png"/>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<div class="visitor-profile-browser" title="{% if visitData.plugins is defined %}{{ 'UserSettings_BrowserWithPluginsEnabled'|translate(visitData.browserName, visitData.plugins) }}{% else %}{{ 'UserSettings_BrowserWithNoPluginsEnabled'|translate(visitData.browserName) }}{% endif %}">
|
||||
<img src="{{ visitData.browserIcon }}"/><span>{{ visitData.browserName|split(' ')[0] }}</span>
|
||||
</div>
|
||||
<div class="visitor-profile-os">
|
||||
<img src="{{ visitData.operatingSystemIcon }}"/><span>{{ visitData.operatingSystemShortName }}</span>
|
||||
</div>
|
||||
</li>
|
||||
<li><span>{{ 'UserSettings_ColumnResolution'|translate }}</span><strong>{{ visitData.resolution }}</strong></li>
|
||||
{% if visitReferralSummary is defined %}
|
||||
{%- set keywordNotDefined = 'General_NotDefined'|translate('General_ColumnKeyword'|translate) -%}
|
||||
<li>
|
||||
<span>{{ 'General_DateRangeFrom'|translate }}</span>
|
||||
<strong {% if visitData.referrerType == 'search' and '(' not in visitReferralSummary %}title="{{ keywordNotDefined }}"{% endif %}>{{ visitReferralSummary }}</strong>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="visitor-profile-latest-visit-column">
|
||||
<ul>
|
||||
{% for id,customVariable in visitData.customVariables %}
|
||||
{% if loop.index0 < 4 %}
|
||||
{{ macros.customVar(id, customVariable) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if visitData.customVariables|length > 4 %}
|
||||
<ul class="visitor-profile-extra-cvars" style="display:none;">
|
||||
{% for id,customVariable in visitData.customVariables %}
|
||||
{% if loop.index0 >= 4 %}
|
||||
{{ macros.customVar(id, customVariable) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p class="visitor-profile-see-more-cvars"><a href="#">▼</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
17
www/analytics/plugins/Live/templates/getVisitList.twig
Normal file
17
www/analytics/plugins/Live/templates/getVisitList.twig
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% for visitInfo in visits.getRows() %}
|
||||
<li>
|
||||
<div>
|
||||
<div class="visitor-profile-visit-title-row"><h2 class="visitor-profile-visit-title" data-idvisit="{{ visitInfo.getColumn('idVisit') }}" title="{{ 'Live_ClickToViewMoreAboutVisit'|translate }}">{{ 'General_Visit'|translate }} #{{ startCounter }}</h2>{% if visitInfo.getColumn('visitDuration') != 0 %}<span> - ({{ visitInfo.getColumn('visitDurationPretty')|raw }})</span>{% endif %}<span class="visitor-profile-date" title="{{ visitInfo.getColumn('serverDateTimePrettyFirstAction') }}">{{ visitInfo.getColumn('serverDatePrettyFirstAction') }}</span></div>
|
||||
<ol class="visitor-profile-actions">
|
||||
{% include "@Live/_actionsList.twig" with {'actionDetails': visitInfo.getColumn('actionDetails'),
|
||||
'clientSideParameters': {
|
||||
'filterEcommerce': false,
|
||||
'idSite': idSite,
|
||||
'pageUrlNotDefined': 'General_NotDefined'|translate('Actions_ColumnPageURL'|translate)
|
||||
},
|
||||
'overrideLinkStyle': false} %}
|
||||
</ol>
|
||||
</div>
|
||||
</li>
|
||||
{% set startCounter = startCounter + 1 %}
|
||||
{% endfor %}
|
||||
149
www/analytics/plugins/Live/templates/getVisitorProfilePopup.twig
Normal file
149
www/analytics/plugins/Live/templates/getVisitorProfilePopup.twig
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<div class="visitor-profile"
|
||||
data-visitor-id="{{ visitorData.lastVisits.getFirstRow().getColumn('visitorId') }}"
|
||||
data-next-visitor="{{ visitorData.nextVisitorId }}"
|
||||
data-prev-visitor="{{ visitorData.previousVisitorId }}"
|
||||
tabindex="0">
|
||||
<a href class="visitor-profile-close"></a>
|
||||
<div class="visitor-profile-info">
|
||||
<div>
|
||||
<div class="visitor-profile-overview">
|
||||
<div class="visitor-profile-avatar">
|
||||
<div>
|
||||
<div class="visitor-profile-image-frame">
|
||||
<img src="{{ visitorData.visitorAvatar|default("plugins/Live/images/unknown_avatar.jpg") }}"
|
||||
alt="{{ visitorData.visitorDescription|default('') }}"/>
|
||||
</div>
|
||||
<img src="plugins/Live/images/paperclip.png" alt=""/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="visitor-profile-header">
|
||||
{% if visitorData.previousVisitorId is not empty %}<a class="visitor-profile-prev-visitor" href="#" title="{{ 'Live_PreviousVisitor'|translate }}">←</a>{% endif %}
|
||||
<h1>{{ 'Live_VisitorProfile'|translate }} <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/></h1>
|
||||
<a href="http://piwik.org/docs/user-profile/" class="reportDocumentationIcon" target="_blank" title="{{ 'General_ViewDocumentationFor'|translate("Live_VisitorProfile"|translate|ucwords) }}"></a>
|
||||
{% if visitorData.nextVisitorId is not empty %}<a class="visitor-profile-next-visitor" href="#" title="{{ 'Live_NextVisitor'|translate }}">→</a>{% endif %}
|
||||
</div>
|
||||
<div class="visitor-profile-latest-visit">
|
||||
{% include "@Live/getSingleVisitSummary.twig" with {'visitData': visitorData.lastVisits.getFirstRow().getColumns(), 'showLocation': false} %}
|
||||
</div>
|
||||
</div>
|
||||
<p style="clear:both; border:none!important;"></p>
|
||||
</div>
|
||||
<div class="visitor-profile-summary">
|
||||
<h1>{{ 'General_Summary'|translate }}</h1>
|
||||
<div>
|
||||
<p>{{ 'Live_VisitSummary'|translate('<strong>' ~ visitorData.totalVisitDurationPretty ~ '</strong>', '', '', '<strong>', visitorData.totalActions, visitorData.totalVisits, '</strong>')|raw }}</p>
|
||||
<p>{% if visitorData.totalGoalConversions %}<strong>{% endif %}{{ 'Live_ConvertedNGoals'|translate(visitorData.totalGoalConversions) }}{% if visitorData.totalGoalConversions %}</strong>{% endif %}
|
||||
{%- if visitorData.totalGoalConversions %} (
|
||||
{%- for idGoal, totalConversions in visitorData.totalConversionsByGoal -%}
|
||||
{%- set idGoal = idGoal[7:] -%}
|
||||
{%- if not loop.first %}, {% endif -%}{{- totalConversions }} <span class="visitor-profile-goal-name">{{ goals[idGoal]['name'] -}}</span>
|
||||
{%- endfor -%}
|
||||
){% endif %}.</p>
|
||||
{% if visitorData.totalEcommerceConversions|default(0) > 0 or visitorData.totalAbandonedCarts|default(0) > 0%}
|
||||
<p>
|
||||
{{ 'Goals_Ecommerce'|translate }}:
|
||||
{%- if visitorData.totalEcommerceConversions|default(0) > 0 %} {{ 'Live_EcommerceSummaryConversions'|translate('<strong>', visitorData.totalEcommerceConversions, visitorData.totalEcommerceRevenue|money(idSite), '</strong>', visitorData.totalEcommerceItems)|raw }}
|
||||
{%- endif -%}
|
||||
{%- if visitorData.totalAbandonedCarts|default(0) > 0 %} {{ 'Live_AbandonedCartSummary'|translate('<strong>', visitorData.totalAbandonedCarts, '</strong>', visitorData.totalAbandonedCartsItems, '<strong>', visitorData.totalAbandonedCartsRevenue|money(idSite), '</strong>')|raw }}{%- endif -%}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if visitorData.totalSearches|default(0) %}
|
||||
<p>
|
||||
{{ 'Actions_WidgetSearchKeywords'|translate }}:
|
||||
{%- for entry in visitorData.searches %} <strong title="{% if entry.searches == 1 %}{{ 'Actions_OneSearch'|translate }}{% else %}{{ 'UserCountryMap_Searches'|translate(entry.searches) }}{% endif %}">{{ entry.keyword }}</strong>{% if not loop.last %},{% endif %}{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if visitorData.averagePageGenerationTime is defined %}
|
||||
<p title="{{ 'Live_CalculatedOverNPageViews'|translate(visitorData.totalPageViews) }}">
|
||||
{{ 'Live_AveragePageGenerationTime'|translate('<strong>' ~ visitorData.averagePageGenerationTime ~ 's</strong>')|raw }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="visitor-profile-important-visits">
|
||||
{%- set keywordNotDefined = 'General_NotDefined'|translate('General_ColumnKeyword'|translate) -%}
|
||||
<div>
|
||||
<h1>{% if visitorData.visitsAggregated == 100 %}{{ 'General_Visit'|translate }}# 100{% else %}{{ 'Live_FirstVisit'|translate }}{% endif %}</h1>
|
||||
<div>
|
||||
<p><strong>{{ visitorData.firstVisit.prettyDate }}</strong><span> - {{ 'UserCountryMap_DaysAgo'|translate(visitorData.firstVisit.daysAgo) }}</span></p>
|
||||
<p><span>{{ 'General_FromReferrer'|translate }}:</span>
|
||||
<strong {% if visitorData.firstVisit.referrerType == 'search' and '(' not in visitorData.firstVisit.referralSummary %}title="{{ keywordNotDefined }}"{% endif %}>{{ visitorData.firstVisit.referralSummary }}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
{% if visitorData.lastVisits.getRowsCount() != 1 %}
|
||||
<div>
|
||||
<h1>{{ 'Live_LastVisit'|translate }}</h1>
|
||||
<div>
|
||||
<p><strong>{{ visitorData.lastVisit.prettyDate }}</strong><span> - {{ 'UserCountryMap_DaysAgo'|translate(visitorData.lastVisit.daysAgo) }}</span></p>
|
||||
<p><span>{{ 'General_FromReferrer'|translate }}:</span>
|
||||
<strong {% if visitorData.lastVisit.referrerType == 'search' and '(' not in visitorData.lastVisit.referralSummary %}title="{{ keywordNotDefined }}"{% endif %}>{{ visitorData.lastVisit.referralSummary }}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<div class="visitor-profile-location">
|
||||
<h1>{{ 'UserCountry_Location'|translate }}</h1>
|
||||
<p>
|
||||
{%- for entry in visitorData.countries -%}
|
||||
|
||||
{% set entryCity -%}
|
||||
{% if entry.cities is defined and 1 == entry.cities|length and entry.cities|join -%}
|
||||
{{ entry.cities|join }}
|
||||
{%- elseif entry.cities is defined and 1 < entry.cities|length -%}
|
||||
<span title="{{ entry.cities|join(', ') }}">{{ 'UserCountry_FromDifferentCities'|translate }}</span>
|
||||
{%- endif %}
|
||||
{%- endset %}
|
||||
|
||||
{% set entryVisits -%}
|
||||
<strong>
|
||||
{% if entry.nb_visits == 1 -%}
|
||||
{{ 'General_OneVisit'|translate }}
|
||||
{%- else -%}
|
||||
{{ 'General_NVisits'|translate(entry.nb_visits) }}
|
||||
{%- endif -%}
|
||||
</strong>
|
||||
{%- endset %}
|
||||
|
||||
{% set entryCountry -%}
|
||||
{%- if entryCity -%}
|
||||
{{ 'UserCountry_CityAndCountry'|translate(entryCity, entry.prettyName)|raw }}
|
||||
{%- else -%}
|
||||
{{ entry.prettyName }}
|
||||
{%- endif -%}
|
||||
|
||||
<img src="{{ entry.flag }}" title="{{ entry.prettyName }}"/>
|
||||
{%- endset %}
|
||||
|
||||
{{- 'General_XFromY'|translate(entryVisits, entryCountry)|raw -}}{% if not loop.last %}, {% endif %}
|
||||
{%- endfor %}
|
||||
<a class="visitor-profile-show-map" href="#" {% if userCountryMapUrl|default('') is empty %}style="display:none"{% endif %}>({{ 'Live_ShowMap'|translate|replace({' ': ' '})|raw }})</a> <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/>
|
||||
</p>
|
||||
<div class="visitor-profile-map" style="display:none" data-href="{{ userCountryMapUrl|default('') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="visitor-profile-visits-info">
|
||||
<div class="visitor-profile-pages-visited">
|
||||
<h1>{{ 'Live_VisitedPages'|translate }}</h1>
|
||||
</div>
|
||||
<div class="visitor-profile-visits-container">
|
||||
<ol class="visitor-profile-visits">
|
||||
{% include "@Live/getVisitList.twig" with {'visits': visitorData.lastVisits, 'startCounter': 1} %}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="visitor-profile-more-info">
|
||||
{% if visitorData.lastVisits.getRowsCount() >= constant("Piwik\\Plugins\\Live\\API::VISITOR_PROFILE_MAX_VISITS_TO_SHOW") %}
|
||||
<a href="#">{{ 'Live_LoadMoreVisits'|translate }}</a> <img class="loadingPiwik" style="display:none;" src="plugins/Zeitgeist/images/loading-blue.gif"/>
|
||||
{% else %}
|
||||
<span class="visitor-profile-no-visits">{{ 'Live_NoMoreVisits'|translate }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function() { require('piwik/UI').VisitorProfileControl.initElements(); });
|
||||
</script>
|
||||
49
www/analytics/plugins/Live/templates/index.twig
Normal file
49
www/analytics/plugins/Live/templates/index.twig
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function () {
|
||||
var segment = broadcast.getValueFromUrl('segment');
|
||||
|
||||
$('#visitsLive').liveWidget({
|
||||
interval: {{ liveRefreshAfterMs }},
|
||||
onUpdate: function () {
|
||||
//updates the numbers of total visits in startbox
|
||||
var ajaxRequest = new ajaxHelper();
|
||||
ajaxRequest.setFormat('html');
|
||||
ajaxRequest.addParams({
|
||||
module: 'Live',
|
||||
action: 'ajaxTotalVisitors',
|
||||
segment: segment
|
||||
}, 'GET');
|
||||
ajaxRequest.setCallback(function (r) {
|
||||
$("#visitsTotal").html(r);
|
||||
});
|
||||
ajaxRequest.send(false);
|
||||
},
|
||||
maxRows: 10,
|
||||
fadeInSpeed: 600,
|
||||
dataUrlParams: {
|
||||
module: 'Live',
|
||||
action: 'getLastVisitsStart',
|
||||
segment: segment
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% include "@Live/_totalVisitors.twig" %}
|
||||
|
||||
{{ visitors|raw }}
|
||||
|
||||
{% spaceless %}
|
||||
<div class="visitsLiveFooter">
|
||||
<a title="Pause Live!" href="javascript:void(0);" onclick="onClickPause();">
|
||||
<img id="pauseImage" border="0" src="plugins/Live/images/pause_disabled.gif" />
|
||||
</a>
|
||||
<a title="Start Live!" href="javascript:void(0);" onclick="onClickPlay();">
|
||||
<img id="playImage" border="0" src="plugins/Live/images/play.gif" />
|
||||
</a>
|
||||
{% if not disableLink %}
|
||||
|
||||
<a class="rightLink" href="javascript:broadcast.propagateAjax('module=Live&action=getVisitorLog')">{{ 'Live_LinkVisitorLog'|translate }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endspaceless %}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<h2 piwik-enriched-headline>{% if filterEcommerce %}{{ 'Goals_EcommerceLog'|translate }}{% else %}{{ 'Live_VisitorLog'|translate }}{% endif %}</h2>
|
||||
|
||||
{{ visitorLog|raw }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue