PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,34 @@
{% import 'ajaxMacros.twig' as ajax %}
{{ ajax.errorDiv() }}
<script type="text/javascript">
{% if userCanEditGoals %}
{% if onlyShowAddNewGoal is not defined %}
piwik.goals = {{ goalsJSON|raw }};
{% endif %}
{% else %}
piwik.goals = {{ goalsJSON|raw }};
{% endif %}
</script>
<div piwik-manage-goals
{% if userCanEditGoals %}
{% if onlyShowAddNewGoal is not defined %}
{% if idGoal %}
show-goal="{{ idGoal|e('js') }}"
{% endif %}
{% else %}
show-add-goal="true"
{% endif %}
{% endif %}>
{% if onlyShowAddNewGoal is not defined %}
{% include "@Goals/_listGoalEdit.twig" %}
{% endif %}
{% if userCanEditGoals %}
{% include "@Goals/_formAddGoal.twig" %}
{% endif %}
<a id='bottom'></a>
</div>

View File

@ -0,0 +1,168 @@
<div piwik-content-block
content-title="{{ 'Goals_AddNewGoal'|translate|e('html_attr') }}"
class="addEditGoal"
ng-show="manageGoals.showEditGoal">
{% if addNewGoalIntro is defined and addNewGoalIntro %}
{{ addNewGoalIntro|raw }}
{% endif %}
<div piwik-form>
<div piwik-field uicontrol="text" name="goal_name"
ng-model="manageGoals.goal.name"
maxlength="50"
title="{{ 'Goals_GoalName'|translate|e('html_attr') }}">
</div>
<div piwik-field uicontrol="text" name="goal_description"
ng-model="manageGoals.goal.description"
maxlength="255"
title="{{ 'General_Description'|translate|e('html_attr') }}">
</div>
<div class="row goalIsTriggeredWhen">
<div class="col s12">
<h3>{{ 'Goals_GoalIsTriggered'|translate|e('html_attr') }}</h3>
</div>
</div>
<div class="row">
<div class="col s12 m6 goalTriggerType">
<div piwik-field uicontrol="select" name="trigger_type"
ng-model="manageGoals.goal.triggerType"
ng-change="manageGoals.changedTriggerType()"
full-width="true"
options="{{ goalTriggerTypeOptions|json_encode }}">
</div>
</div>
<div class="col s12 m6">
<div piwik-alert="info" ng-show="manageGoals.goal.triggerType == 'manually'">
{{ 'Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore'|translate("<a target='_blank' rel='noreferrer noopener' href='https://developer.matomo.org/guides/tracking-javascript-guide#manually-trigger-goal-conversions'>","</a>")|raw }}
</div>
<div piwik-field uicontrol="radio" name="match_attribute"
ng-show="manageGoals.goal.triggerType != 'manually'"
full-width="true"
ng-model="manageGoals.goal.matchAttribute"
options="{{ goalMatchAttributeOptions|json_encode }}">
</div>
</div>
</div>
<div class="row whereTheMatchAttrbiute" ng-show="manageGoals.goal.triggerType != 'manually'">
<h3 class="col s12">{{ 'Goals_WhereThe'|translate|e('html_attr') }}
<span ng-show="manageGoals.goal.matchAttribute == 'url'">
{{ 'Goals_URL'|translate }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'title'">
{{ 'Goals_PageTitle'|translate }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'file'">
{{ 'Goals_Filename'|translate }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'external_website'">
{{ 'Goals_ExternalWebsiteUrl'|translate }}
</span>
</h3>
</div>
<div class="row" ng-show="manageGoals.goal.triggerType != 'manually'">
<div class="col s12 m6 l4"
ng-show="manageGoals.goal.matchAttribute == 'event'">
<div piwik-field uicontrol="select" name="event_type"
ng-model="manageGoals.goal.eventType"
full-width="true"
options="{{ eventTypeOptions|json_encode }}">
</div>
</div>
<div class="col s12 m6 l4">
<div piwik-field uicontrol="select" name="pattern_type"
ng-model="manageGoals.goal.patternType"
full-width="true"
options="{{ patternTypeOptions|json_encode }}">
</div>
</div>
<div class="col s12 m6 l4">
<div piwik-field uicontrol="text" name="pattern"
ng-model="manageGoals.goal.pattern"
maxlength="255"
title="{{ 'Goals_Pattern'|translate|e('html_attr') }}"
full-width="true">
</div>
</div>
<div id="examples_pattern" class="col s12" piwik-alert="info">
<span ng-show="manageGoals.goal.matchAttribute == 'url'">
{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'checkout/confirmation'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://example.com/thank-you.html'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'(.*)\\\/demo\\\/(.*)'") }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'title'">
{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'Order confirmation'") }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'file'">
{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'files/brochure.pdf'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://example.com/files/brochure.pdf'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'(.*)\\\.zip'") }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'external_website'">
{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'amazon.com'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'http://mypartner.com/landing.html'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'http://www.amazon.com\\\/(.*)\\\/yourAffiliateId'") }}
</span>
<span ng-show="manageGoals.goal.matchAttribute == 'event'">
{{ 'General_ForExampleShort'|translate }} {{ 'Goals_Contains'|translate("'video'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_IsExactly'|translate("'click'") }}
<br />{{ 'General_ForExampleShort'|translate }} {{ 'Goals_MatchesExpression'|translate("'(.*)_banner'") }}"
</span>
</div>
</div>
<div piwik-field uicontrol="checkbox" name="case_sensitive"
ng-model="manageGoals.goal.caseSensitive"
ng-show="manageGoals.goal.triggerType != 'manually'"
title="{{ 'Goals_CaseSensitive'|translate|e('html_attr') }} {{ 'Goals_Optional'|translate|e('html_attr') }}">
</div>
<div piwik-field uicontrol="radio" name="allow_multiple"
ng-model="manageGoals.goal.allowMultiple"
options="{{ allowMultipleOptions|json_encode }}"
introduction="{{ 'Goals_AllowMultipleConversionsPerVisit'|translate|e('html_attr') }}"
inline-help="{{ 'Goals_HelpOneConversionPerVisit'|translate|e('html_attr') }}">
</div>
<h3>{{ 'Goals_GoalRevenue'|translate }} {{ 'Goals_Optional'|translate }}</h3>
<div piwik-field uicontrol="number" name="revenue"
ng-model="manageGoals.goal.revenue"
placeholder="{{ 'Goals_DefaultRevenueLabel'|translate }}"
inline-help="{{ 'Goals_DefaultRevenueHelp'|translate|e('html_attr') }}">
</div>
<div piwik-field uicontrol="checkbox" name="use_event_value"
ng-model="manageGoals.goal.useEventValueAsRevenue"
title="{{ 'Goals_UseEventValueAsRevenue'|translate|e('html_attr') }}"
ng-show="manageGoals.goal.matchAttribute == 'event'"
inline-help="{{ 'Goals_EventValueAsRevenueHelp'|translate|e('html_attr') }} &lt;br/&gt;&lt;br/&gt; {{ 'Goals_EventValueAsRevenueHelp2'|translate|e('html_attr') }}"
>
</div>
{{ postEvent("Template.endGoalEditTable") }}
<input type="hidden" name="goalIdUpdate" value=""/>
<div piwik-save-button
saving="manageGoals.isLoading"
onconfirm="manageGoals.save()"
ng-value="manageGoals.goal.submitText"></div>
{% if onlyShowAddNewGoal is not defined %}
<div class='entityCancel' ng-show="manageGoals.showEditGoal" ng-click="manageGoals.showListOfReports()">
{{ 'General_OrCancel'|translate("<a class='entityCancelLink'>","</a>")|raw }}
</div>
{% endif %}
</div>
</div>

View File

@ -0,0 +1,116 @@
<div id='entityEditContainer' feature="true"
ng-show="manageGoals.showGoalList"
piwik-content-block content-title="{{ 'Goals_ManageGoals'|translate|e('html_attr') }}"
class="managegoals">
<div piwik-activity-indicator loading="manageGoals.isLoading"></div>
<div class="contentHelp">
{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/tracking-goals-web-analytics/'>","</a>")|raw }}
{% if not ecommerceEnabled %}
<br /><br/>
{% set websiteManageText %}
<a href='{{ linkTo({'module':'SitesManager','action':'index' }) }}'>{{ 'SitesManager_WebsitesManagement'|translate }}</a>
{% endset %}
{% set ecommerceReportText %}
<a href="https://matomo.org/docs/ecommerce-analytics/" rel="noreferrer noopener" target="_blank">{{ 'Goals_EcommerceReports'|translate }}</a>
{% endset %}
{{ 'Goals_Optional'|translate }} {{ 'Goals_Ecommerce'|translate }}: {{ 'Goals_YouCanEnableEcommerceReports'|translate(ecommerceReportText,websiteManageText)|raw }}
{% endif %}
</div>
<table piwik-content-table>
<thead>
<tr>
<th class="first">Id</th>
<th>{{ 'Goals_GoalName'|translate }}</th>
<th>{{ 'General_Description'|translate }}</th>
<th>{{ 'Goals_GoalIsTriggeredWhen'|translate }}</th>
<th>{{ 'General_ColumnRevenue'|translate }}</th>
{{ postEvent("Template.beforeGoalListActionsHead") }}
{% if userCanEditGoals %}
<th>{{ 'General_Edit'|translate }}</th>
<th>{{ 'General_Delete'|translate }}</th>
{% endif %}
</tr>
</thead>
{% if goals is empty %}
<tr>
<td colspan='8'>
<br/>
{{ 'Goals_ThereIsNoGoalToManage'|translate(siteName)|rawSafeDecoded }}.
<br/><br/>
</td>
</tr>
{% else %}
{% for goal in goals %}
<tr id="{{ goal.idgoal }}">
<td class="first">{{ goal.idgoal }}</td>
<td>{{ goal.name }}</td>
<td>{{ goal.description }}</td>
<td><span class='matchAttribute'>{{ goal.match_attribute }}</span>
{% if goal.pattern_type is defined %}
<br/>
{{ 'Goals_Pattern'|translate }} {{ goal.pattern_type }}: {{ goal.pattern }}
{% endif %}
</td>
<td class="center">
{% if goal.revenue==0 %}-{% else %}{{ goal.revenue|money(idSite)|raw }}{% endif %}
</td>
{{ postEvent("Template.beforeGoalListActionsBody", goal) }}
{% if userCanEditGoals %}
<td style="padding-top:2px">
<button ng-click="manageGoals.editGoal({{ goal.idgoal }})" class="table-action" title="{{ 'General_Edit'|translate }}">
<span class="icon-edit"></span>
</button>
</td>
<td style="padding-top:2px">
<button ng-click="manageGoals.deleteGoal({{ goal.idgoal }})" class="table-action" title="{{ 'General_Delete'|translate }}">
<span class="icon-delete"></span>
</button>
</td>
{% endif %}
</tr>
{% endfor %}
{% endif %}
</table>
{% if userCanEditGoals and onlyShowAddNewGoal is not defined %}
<div class="tableActionBar">
<button id="add-goal" ng-click="manageGoals.createGoal()">
<span class="icon-add"></span>
{{ 'Goals_AddNewGoal'|translate }}
</button>
</div>
{% endif %}
</div>
<div class="ui-confirm" id="confirm">
<h2></h2>
<input role="yes" type="button" value="{{ 'General_Yes'|translate }}"/>
<input role="no" type="button" value="{{ 'General_No'|translate }}"/>
</div>
<script type="text/javascript">
var goalTypeToTranslation = {
"manually": "{{ 'Goals_ManuallyTriggeredUsingJavascriptFunction'|translate }}",
"file": "{{ 'Goals_Download'|translate }}",
"url": "{{ 'Goals_VisitUrl'|translate }}",
"title": "{{ 'Goals_VisitPageTitle'|translate }}",
"external_website": "{{ 'Goals_ClickOutlink'|translate }}",
"event_action": "{{ 'Goals_SendEvent'|translate }} ({{ 'Events_EventAction'|translate }})",
"event_category": "{{ 'Goals_SendEvent'|translate }} ({{ 'Events_EventCategory'|translate }})",
"event_name": "{{ 'Goals_SendEvent'|translate }} ({{ 'Events_EventName'|translate }})"
};
$(document).ready(function () {
// translation of the goal "match attribute" to human readable description
$('.matchAttribute').each(function () {
var matchAttribute = $(this).text();
var translation = goalTypeToTranslation[matchAttribute];
$(this).text(translation);
});
});
</script>

View File

@ -0,0 +1,16 @@
{% for element in topDimension %}
{% set goal_nb_conversion=element.nb_conversions %}
{% set goal_conversion_rate=element.conversion_rate %}
<span class='goalTopElement' title='{{ 'Goals_Conversions'|translate("<b>"~goal_nb_conversion|number~"</b>")|raw }},
{{ 'Goals_ConversionRate'|translate("<b>"~goal_conversion_rate|number~"</b>")|raw }}'>
{{ element.name }}
</span>
{% import 'macros.twig' as piwik %}
{{ piwik.logoHtml(element.metadata, element.name) }}
{% if loop.index == loop.length-1 %}
and
{% elseif loop.index < loop.length-1 %}
,
{% endif %}
{% endfor %}

View File

@ -0,0 +1,22 @@
{% if userCanEditGoals %}
{% set addNewGoalIntro %}
<p>{{ 'Goals_NewGoalIntro'|translate }}</p>
<p>{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/tracking-goals-web-analytics/'>","</a>")|raw }}</p>
{% endset %}
{% include "@Goals/_addEditGoal.twig" %}
<br/><br/>
{% else %}
<div piwik-content-block content-title="{{ 'Goals_AddNewGoal'|translate|e('html_attr') }}">
<p>
{{ 'Goals_NoGoalsNeedAccess2'|translate|raw }}
</p>
<p>
{{ 'Goals_LearnMoreAboutGoalTrackingDocumentation'|translate("<a target='_blank' rel='noreferrer noopener' href='https://matomo.org/docs/tracking-goals-web-analytics/'>","</a>")|raw }}
</p>
</div>
{{ postEvent("Template.afterGoalCannotAddNewGoal") }}
{% endif %}

View File

@ -0,0 +1,24 @@
<div piwik-content-block
content-title="{{ 'Goals_ConversionsOverview'|translate|e('html_attr') }}">
<ul class="ulGoalTopElements">
{% if topDimensions.country is defined %}
<li>{{ 'Goals_BestCountries'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.country} %}</li>
{% endif %}
{% if topDimensions.keyword is defined and topDimensions.keyword|length > 0 %}
<li>{{ 'Goals_BestKeywords'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.keyword} %}</li>
{% endif %}
{% if topDimensions.website is defined and topDimensions.website|length > 0 %}
<li>{{ 'Goals_BestReferrers'|translate }} {% include '@Goals/_listTopDimension.twig' with {'topDimension':topDimensions.website} %}</li>
{% endif %}
<li>
{{ 'Goals_ReturningVisitorsConversionRateIs'|translate("<strong>"~conversion_rate_returning~"</strong>")|raw }}
, {{ 'Goals_NewVisitorsConversionRateIs'|translate("<strong>"~conversion_rate_new~"</strong>")|raw }}
</li>
</ul>
<a href="javascript:;" class="segmentedlog" onclick="SegmentedVisitorLog.show('Goals.getMetrics', 'visitConvertedGoalId=={{ idGoal }}', {})">
<span class="icon-visitor-profile rowActionIcon"></span> {{ 'Live_RowActionTooltipWithDimension'|translate('General_Goal'|translate) }}
</a>
{{ postEvent("Template.afterGoalConversionOverviewReport") }}
<br style="clear:left"/>
</div>

View File

@ -0,0 +1,14 @@
{% if userCanEditGoals %}
{% include "@Goals/_addEditGoal.twig" %}
{% else %}
<h2>{{ 'Goals_ManageGoals'|translate }}</h2>
<p>
{{ 'Goals_NeedAccess'|translate|raw }}
</p>
{% include "@Goals/_addEditGoal.twig" %}
{% endif %}

View File

@ -0,0 +1,24 @@
{% extends 'admin.twig' %}
{% set title %}{{ 'Goals_ManageGoals'|translate }}{% endset %}
{% block topcontrols %}
{% include "@CoreHome/_siteSelectHeader.twig" %}
{% endblock %}
{% block content %}
{% include "@Goals/_addEditGoal.twig" %}
<style type="text/css">
.entityAddContainer {
position:relative;
}
.entityAddContainer > .entityCancel:first-child {
position: absolute;
right:0;
bottom:100%;
}
</style>
{% endblock %}