Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_formAddGoal.twig « templates « Goals « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 84620ee1f52ec8f9a7ef0ad112d0c53643d15435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<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>

        <div piwik-field uicontrol="text" name="revenue"
             ng-model="manageGoals.goal.revenue"
             introduction="{{ 'Goals_DefaultRevenue'|translate }} {{ 'Goals_Optional'|translate }}"
             inline-help="{{ 'Goals_DefaultRevenueHelp'|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>