File: Goals.php

package info (click to toggle)
matomo 5.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,596 kB
  • sloc: php: 231,041; javascript: 102,286; python: 202; xml: 189; sh: 172; makefile: 20; sql: 10
file content (534 lines) | stat: -rw-r--r-- 23,912 bytes parent folder | download
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<?php

/**
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */

namespace Piwik\Plugins\Goals;

use Piwik\API\Request;
use Piwik\Columns\ComputedMetricFactory;
use Piwik\Columns\Dimension;
use Piwik\Columns\MetricsList;
use Piwik\Common;
use Piwik\DataTable\Filter\AddColumnsProcessedMetricsGoal;
use Piwik\Piwik;
use Piwik\Plugin\ArchivedMetric;
use Piwik\Plugin\ComputedMetric;
use Piwik\Plugin\ReportsProvider;
use Piwik\Plugins\CoreHome\SystemSummary;
use Piwik\Plugins\Goals\RecordBuilders\ProductRecord;
use Piwik\Tracker\GoalManager;
use Piwik\Category\Subcategory;

/**
 *
 */
class Goals extends \Piwik\Plugin
{
    public static function getReportsWithGoalMetrics()
    {
        $dimensions = self::getAllReportsWithGoalMetrics();

        $dimensionsByGroup = array();
        foreach ($dimensions as $dimension) {
            $group = $dimension['category'];
            // move "Custom Variables" report to the "Goals/Sales by User attribute" category
            if (
                $dimension['module'] === 'CustomVariables'
                || $dimension['action'] == 'getVisitInformationPerServerTime'
            ) {
                $group = 'VisitsSummary_VisitsSummary';
            }
            unset($dimension['category']);
            $dimensionsByGroup[$group][] = $dimension;
        }

        return $dimensionsByGroup;
    }

    public static function getGoalIdFromGoalColumn($columnName)
    {
        if (strpos($columnName, 'goal_') === 0) {
            $column = str_replace(array('goal_'), '', $columnName);
            return (int) $column;
        }
    }

    public static function makeGoalColumn($idGoal, $column, $forceInt = true)
    {
        if ($forceInt) { // in non-archiver code idGoal can be, eg, ecommerceOrder
            $idGoal = (int) $idGoal;
        }

        return 'goal_' . $idGoal . '_' . $column;
    }

    public static function getGoalColumns($idGoal)
    {
        $columns = array(
            'nb_conversions',
            'nb_visits_converted',
            'revenue',
        );
        if ($idGoal === false) {
            return $columns;
        }
        // Orders
        if ($idGoal === GoalManager::IDGOAL_ORDER) {
            $columns = array_merge($columns, array(
                                                  'revenue_subtotal',
                                                  'revenue_tax',
                                                  'revenue_shipping',
                                                  'revenue_discount',
                                             ));
        }
        // Abandoned carts & orders
        if ($idGoal <= GoalManager::IDGOAL_ORDER) {
            $columns[] = 'items';
        }
        return $columns;
    }

    /**
     * @see \Piwik\Plugin::registerEvents
     */
    public function registerEvents()
    {
        $hooks = array(
            'AssetManager.getStylesheetFiles'        => 'getStylesheetFiles',
            'Tracker.Cache.getSiteAttributes'        => 'fetchGoalsFromDb',
            'API.getReportMetadata.end'              => 'getReportMetadataEnd',
            'SitesManager.deleteSite.end'            => 'deleteSiteGoals',
            'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
            'Metrics.getDefaultMetricTranslations'   => 'addMetricTranslations',
            'Metrics.getDefaultMetricSemanticTypes'  => 'addMetricSemanticTypes',
            'Category.addSubcategories'              => 'addSubcategories',
            'Metric.addMetrics'                      => 'addMetrics',
            'Metric.addComputedMetrics'              => 'addComputedMetrics',
            'System.addSystemSummaryItems'           => 'addSystemSummaryItems',
            'Archiver.addRecordBuilders'             => 'addRecordBuilders',
        );
        return $hooks;
    }

    public function addRecordBuilders(array &$recordBuilders): void
    {
        $recordBuilders[] = new ProductRecord(ProductRecord::SKU_FIELD, ProductRecord::ITEMS_SKU_RECORD_NAME);
        $recordBuilders[] = new ProductRecord(ProductRecord::NAME_FIELD, ProductRecord::ITEMS_NAME_RECORD_NAME);
        $recordBuilders[] = new ProductRecord(ProductRecord::CATEGORY_FIELD, ProductRecord::ITEMS_CATEGORY_RECORD_NAME, [
            ProductRecord::CATEGORY2_FIELD,
            ProductRecord::CATEGORY3_FIELD,
            ProductRecord::CATEGORY4_FIELD,
            ProductRecord::CATEGORY5_FIELD,
        ]);
    }

    public function addSystemSummaryItems(&$systemSummary)
    {
        $goalModel = new Model();
        $numGoals = $goalModel->getActiveGoalCount();

        $systemSummary[] = new SystemSummary\Item($key = 'goals', Piwik::translate('Goals_NGoals', $numGoals), $value = null, array('module' => 'Goals', 'action' => 'manage'), $icon = 'icon-goal', $order = 7);
    }

    public function addComputedMetrics(MetricsList $list, ComputedMetricFactory $computedMetricFactory)
    {
        $idSite = Common::getRequestVar('idSite', 0, 'int');
        $goals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1'], $default = []);

        foreach ($goals as $goal) {
            $metric = $computedMetricFactory->createComputedMetric('goal_' .  $goal['idgoal'] . '_conversion', 'nb_uniq_visitors', ComputedMetric::AGGREGATION_RATE);
            $goalName = '"' . Piwik::translate('Goals_GoalX', $goal['name']) . '"';
            $metricName = Piwik::translate('Goals_ConversionRate', $goalName);
            $metric->setTranslatedName($metricName);
            $list->addMetric($metric);
        }
    }

    public function addMetrics(MetricsList $metricsList)
    {
        $idSite = Common::getRequestVar('idSite', 0, 'int');
        $goals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1'], $default = []);

        foreach ($goals as $goal) {
            $custom = new GoalDimension($goal, 'idgoal', 'Conversions goal "' . $goal['name'] . '" (ID ' . $goal['idgoal'] . ' )');
            $custom->setType(Dimension::TYPE_NUMBER);
            $custom->setSqlSegment('count(distinct log_conversion.idvisit, log_conversion.buster)');

            $metric = new ArchivedMetric($custom, ArchivedMetric::AGGREGATION_SUM);
            $metric->setQuery('count(distinct log_conversion.idvisit, log_conversion.buster)');
            $metric->setTranslatedName($custom->getName());
            $metric->setDocumentation('The number of times this goal was converted.');
            $metric->setCategory($custom->getCategoryId());
            $metric->setName('goal_' . $goal['idgoal'] . '_conversion');
            $metricsList->addMetric($metric);

            $custom = new GoalDimension($goal, 'revenue', 'Revenue goal "' . $goal['name'] . '" (ID ' . $goal['idgoal'] . ' )');
            $custom->setType(Dimension::TYPE_MONEY);
            $metric = new ArchivedMetric($custom, ArchivedMetric::AGGREGATION_SUM);
            $metric->setTranslatedName($custom->getName());
            $metric->setName('goal_' . $goal['idgoal'] . '_revenue');
            $metric->setDocumentation('The amount of revenue that was generated by converting this goal.');
            $metric->setCategory($custom->getCategoryId());
            $metricsList->addMetric($metric);

            $custom = new GoalDimension($goal, 'visitor_seconds_since_first', 'Days to conversion goal "' . $goal['name'] . '" (ID ' . $goal['idgoal'] . ' )');
            $custom->setType(Dimension::TYPE_NUMBER);
            $metric = new ArchivedMetric($custom, ArchivedMetric::AGGREGATION_SUM);
            $metric->setTranslatedName($custom->getName());
            $metric->setCategory($custom->getCategoryId());
            $metric->setDocumentation('The number of days it took a visitor to convert this goal.');
            $metric->setName('goal_' . $goal['idgoal'] . '_daystoconversion');
            $metric->setQuery('sum(floor(log_visit.visitor_seconds_since_first / 86400))');
            $metricsList->addMetric($metric);

            $custom = new GoalDimension($goal, 'visitor_count_visits', 'Visits to conversion goal "' . $goal['name'] . '" (ID ' . $goal['idgoal'] . ' )');
            $custom->setType(Dimension::TYPE_NUMBER);
            $metric = new ArchivedMetric($custom, ArchivedMetric::AGGREGATION_SUM);
            $metric->setTranslatedName($custom->getName());
            $metric->setCategory($custom->getCategoryId());
            $metric->setDocumentation('The number of visits it took a visitor to convert this goal.');
            $metric->setName('goal_' . $goal['idgoal'] . '_visitstoconversion');
            $metricsList->addMetric($metric);
        }
    }

    public function addSubcategories(&$subcategories)
    {
        $idSite = Common::getRequestVar('idSite', 0, 'int');

        if (!$idSite) {
            // fallback for eg API.getReportMetadata which uses idSites
            $idSite = Common::getRequestVar('idSites', 0, 'int');

            if (!$idSite) {
                return;
            }
        }

        $goals = Request::processRequest('Goals.getGoals', ['idSite' => $idSite, 'filter_limit' => '-1', 'orderByName' => true], $default = []);

        $order = 900;
        foreach ($goals as $goal) {
            $category = new Subcategory();
            $category->setName($goal['name']);
            $category->setCategoryId('Goals_Goals');
            $category->setId($goal['idgoal']);
            $category->setOrder($order++);
            $subcategories[] = $category;
        }
    }

    public function addMetricTranslations(&$translations)
    {
        $metrics = array(
            'orders'            => 'General_EcommerceOrders',
            'ecommerce_revenue' => 'General_ProductRevenue',
            'revenue_per_visit' => 'General_ColumnValuePerVisit',
            'quantity'          => 'General_Quantity',
            'avg_price'         => 'General_AveragePrice',
            'avg_quantity'      => 'General_AverageQuantity',
            'revenue_subtotal'  => 'General_Subtotal',
            'revenue_tax'       => 'General_Tax',
            'revenue_shipping'  => 'General_Shipping',
            'revenue_discount'  => 'General_Discount',
            'avg_order_revenue' => 'General_AverageOrderValue',
        );

        $metrics = array_map(array('\\Piwik\\Piwik', 'translate'), $metrics);

        $translations = array_merge($translations, $metrics);
    }

    public function addMetricSemanticTypes(array &$types): void
    {
        $goalMetricTypes = array(
            'orders'            => Dimension::TYPE_NUMBER,
            'ecommerce_revenue' => Dimension::TYPE_MONEY,
            'quantity'          => Dimension::TYPE_NUMBER,
            'revenue_subtotal'  => Dimension::TYPE_MONEY,
            'revenue_tax'       => Dimension::TYPE_MONEY,
            'revenue_shipping'  => Dimension::TYPE_MONEY,
            'revenue_discount'  => Dimension::TYPE_MONEY,
            'avg_order_revenue' => Dimension::TYPE_MONEY,
            'items'             => Dimension::TYPE_NUMBER,
        );

        $types = array_merge($types, $goalMetricTypes);
    }

    /**
     * Delete goals recorded for this site
     */
    public function deleteSiteGoals($idSite)
    {
        $model = new Model();
        $model->deleteGoalsForSite($idSite);
    }

    /**
     * Returns the Metadata for the Goals plugin API.
     * The API returns general Goal metrics: conv, conv rate and revenue globally
     * and for each goal.
     *
     * Also, this will update metadata of all other reports that have Goal segmentation
     */
    public function getReportMetadataEnd(&$reports, $info)
    {
        // Processed in AddColumnsProcessedMetricsGoal
        // These metrics will also be available for some reports, for each goal
        // Example: Conversion rate for Goal 2 for the keyword 'piwik'
        $goalProcessedMetrics = array(
            'revenue_per_visit' => Piwik::translate('General_ColumnValuePerVisit'),
        );

        $goalMetrics = array(
            'nb_conversions'  => Piwik::translate('Goals_ColumnConversions'),
            'conversion_rate' => Piwik::translate('General_ColumnConversionRate'),
            'revenue'         => Piwik::translate('General_ColumnRevenue'),
        );

        $goalMetricTypes = [
            'revenue_per_visit' => Dimension::TYPE_MONEY,
            'nb_conversions' => Dimension::TYPE_NUMBER,
            'conversion_rate' => Dimension::TYPE_PERCENT,
            'revenue' => Dimension::TYPE_MONEY,
        ];

        // special goal metrics for Actions page reports
        $pageGoalMetrics = array_merge($goalMetrics, [
            'nb_conversions_attrib' => Piwik::translate('Goals_ColumnConversions'),
            'revenue_attrib' => Piwik::translate('General_ColumnRevenue'),
        ]);
        unset($pageGoalMetrics['revenue']);

        $pageGoalProcessedMetrics = array_merge($goalProcessedMetrics, [
            'nb_conversions_page_rate' => Piwik::translate('Goals_ConversionRatePageViewedBeforeGeneric'),
        ]);

        $pageGoalMetricTypes = array_merge($goalMetricTypes, [
            'nb_conversions_attrib' => Dimension::TYPE_NUMBER,
            'revenue_attrib' => Dimension::TYPE_MONEY,
            'nb_conversions_page_rate' => Dimension::TYPE_PERCENT,
        ]);
        unset($pageGoalMetricTypes['revenue']);

        // special goal metrics for Actions entry page reports
        $entryPageGoalMetrics = array_merge($goalMetrics, [
            'nb_conversions_entry' => Piwik::translate('Goals_ColumnConversions'),
            'revenue_entry' => Piwik::translate('General_ColumnRevenue'),
        ]);
        unset($entryPageGoalMetrics['revenue']);

        $entryPageGoalProcessedMetrics = array_merge($goalProcessedMetrics, [
            'revenue_per_entry' => Piwik::translate('General_ColumnValuePerEntry'),
            'nb_conversions_entry_rate' => Piwik::translate('General_ColumnConversionRate'),
        ]);

        $entryPageGoalMetricTypes = array_merge($goalMetricTypes, [
            'nb_conversions_entry' => Dimension::TYPE_NUMBER,
            'revenue_entry' => Dimension::TYPE_MONEY,
            'revenue_per_entry' => Dimension::TYPE_NUMBER,
            'nb_conversions_entry_rate' => Dimension::TYPE_PERCENT,
        ]);
        unset($entryPageGoalMetricTypes['revenue']);

        // add ecommerce metrics if idGoal is an ecommerce goal
        $idGoal = \Piwik\Request::fromRequest()->getParameter('idGoal', '');
        if ($idGoal === Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER || $idGoal === Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART) {
            $extraEcommerceProcessedMetrics = [
                'avg_order_revenue' => Piwik::translate('General_AverageOrderValue'),
                'items' => Piwik::translate('General_PurchasedProducts'),
            ];

            $extraEcommerceMetricTypes = [
                'avg_order_revenue' => Dimension::TYPE_MONEY,
                'itmes' => Dimension::TYPE_NUMBER,
            ];

            $pageGoalProcessedMetrics = array_merge($pageGoalProcessedMetrics, $extraEcommerceProcessedMetrics);
            $entryPageGoalProcessedMetrics = array_merge($entryPageGoalProcessedMetrics, $extraEcommerceProcessedMetrics);

            $pageGoalMetricTypes = array_merge($pageGoalMetricTypes, $extraEcommerceMetricTypes);
            $entryPageGoalMetricTypes = array_merge($entryPageGoalMetricTypes, $extraEcommerceMetricTypes);
        }

        $reportsWithGoals = self::getAllReportsWithGoalMetrics();

        foreach ($reportsWithGoals as $reportWithGoals) {
            $goalMetricsToUse = $goalMetrics;
            $goalProcessedMetricsToUse = $goalProcessedMetrics;
            $goalMetricTypesToUse = $goalMetricTypes;

            $request = $reportWithGoals['module'] . '.' . $reportWithGoals['action'];
            if (in_array($request, AddColumnsProcessedMetricsGoal::ACTIONS_PAGE_REPORTS_WITH_GOAL_METRICS)) {
                $goalMetricsToUse = $pageGoalMetrics;
                $goalProcessedMetricsToUse = $pageGoalProcessedMetrics;
                $goalMetricTypesToUse = $pageGoalMetricTypes;
            } elseif (in_array($request, AddColumnsProcessedMetricsGoal::ACTIONS_ENTRY_PAGE_REPORTS_WITH_GOAL_METRICS)) {
                $goalMetricsToUse = $entryPageGoalMetrics;
                $goalProcessedMetricsToUse = $entryPageGoalProcessedMetrics;
                $goalMetricTypesToUse = $entryPageGoalMetricTypes;
            }

            // Select this report from the API metadata array
            // and add the Goal metrics to it
            foreach ($reports as &$apiReportToUpdate) {
                if (
                    $apiReportToUpdate['module'] == $reportWithGoals['module']
                    && $apiReportToUpdate['action'] == $reportWithGoals['action']
                    && empty($apiReportToUpdate['parameters'])
                ) {
                    $apiReportToUpdate['metricsGoal'] = $goalMetricsToUse;
                    $apiReportToUpdate['processedMetricsGoal'] = $goalProcessedMetricsToUse;
                    $apiReportToUpdate['metricTypesGoal'] = $goalMetricTypesToUse;
                    break;
                }
            }
        }
    }

    private static function getAllReportsWithGoalMetrics()
    {
        $reportsWithGoals = array();

        $reports = new ReportsProvider();

        foreach ($reports->getAllReports() as $report) {
            if ($report->hasGoalMetrics() && $report->isEnabled()) {
                $reportsWithGoals[] = array(
                    'category' => $report->getCategoryId(),
                    'name'     => $report->getName(),
                    'module'   => $report->getModule(),
                    'action'   => $report->getAction(),
                    'parameters' => $report->getParameters(),
                );
            }
        }

        $reportsWithGoals[] = array('category' => 'General_Visit',
            'name'     => Piwik::translate('Goals_VisitsUntilConv'),
            'module'   => 'Goals',
            'action'   => 'getVisitsUntilConversion',
            'viewDataTable' => 'table',
        );
        $reportsWithGoals[] = array('category' => 'General_Visit',
            'name'     => Piwik::translate('Goals_DaysToConv'),
            'module'   => 'Goals',
            'action'   => 'getDaysToConversion',
            'viewDataTable' => 'table',
        );

        /**
         * Triggered when gathering all reports that contain Goal metrics. The list of reports
         * will be displayed on the left column of the bottom of every _Goals_ page.
         *
         * If plugins define reports that contain goal metrics (such as **conversions** or **revenue**),
         * they can use this event to make sure their reports can be viewed on Goals pages.
         *
         * **Example**
         *
         *     public function getReportsWithGoalMetrics(&$reports)
         *     {
         *         $reports[] = array(
         *             'category' => Piwik::translate('MyPlugin_myReportCategory'),
         *             'name' => Piwik::translate('MyPlugin_myReportDimension'),
         *             'module' => 'MyPlugin',
         *             'action' => 'getMyReport'
         *         );
         *     }
         *
         * @param array &$reportsWithGoals The list of arrays describing reports that have Goal metrics.
         *                                 Each element of this array must be an array with the following
         *                                 properties:
         *
         *                                 - **category**: The report category. This should be a translated string.
         *                                 - **name**: The report's translated name.
         *                                 - **module**: The plugin the report is in, eg, `'UserCountry'`.
         *                                 - **action**: The API method of the report, eg, `'getCountry'`.
         * @ignore
         * @deprecated since 2.5.0
         */
        Piwik::postEvent('Goals.getReportsWithGoalMetrics', array(&$reportsWithGoals));

        return $reportsWithGoals;
    }

    public function getStylesheetFiles(&$stylesheets)
    {
        $stylesheets[] = "plugins/Goals/stylesheets/goals.less";
    }

    public function fetchGoalsFromDb(&$array, $idSite)
    {
        // add the 'goal' entry in the website array
        $array['goals'] = API::getInstance()->getGoals($idSite);
    }

    public function getClientSideTranslationKeys(&$translationKeys)
    {
        $translationKeys[] = 'Goals_AddGoal';
        $translationKeys[] = 'Goals_AddNewGoal';
        $translationKeys[] = 'Goals_UpdateGoal';
        $translationKeys[] = 'Goals_DeleteGoalConfirm';
        $translationKeys[] = 'Goals_Ecommerce';
        $translationKeys[] = 'Goals_Optional';
        $translationKeys[] = 'Goals_TimeInMinutes';
        $translationKeys[] = 'Goals_Pattern';
        $translationKeys[] = 'Goals_ClickToViewThisGoal';
        $translationKeys[] = 'Goals_ManageGoals';
        $translationKeys[] = 'Goals_GoalName';
        $translationKeys[] = 'Goals_GoalIsTriggeredWhen';
        $translationKeys[] = 'Goals_ThereIsNoGoalToManage';
        $translationKeys[] = 'Goals_ManuallyTriggeredUsingJavascriptFunction';
        $translationKeys[] = 'Goals_VisitUrl';
        $translationKeys[] = 'Goals_ClickOutlink';
        $translationKeys[] = 'Goals_SendEvent';
        $translationKeys[] = 'Goals_GoalIsTriggered';
        $translationKeys[] = 'Goals_WhereThe';
        $translationKeys[] = 'Goals_URL';
        $translationKeys[] = 'Goals_Contains';
        $translationKeys[] = 'Goals_IsExactly';
        $translationKeys[] = 'Goals_MatchesExpression';
        $translationKeys[] = 'Goals_AllowMultipleConversionsPerVisit';
        $translationKeys[] = 'Goals_HelpOneConversionPerVisit';
        $translationKeys[] = 'Goals_DefaultRevenueHelp';
        $translationKeys[] = 'Goals_DefaultRevenueLabel';
        $translationKeys[] = 'Goals_GoalRevenue';
        $translationKeys[] = 'Goals_Filename';
        $translationKeys[] = 'Goals_ExternalWebsiteUrl';
        $translationKeys[] = 'Goals_VisitDuration';
        $translationKeys[] = 'Goals_AtLeastMinutes';
        $translationKeys[] = 'Goals_VisitPageTitle';
        $translationKeys[] = 'Intl_NMinutes';
        $translationKeys[] = 'Goals_PageTitle';
        $translationKeys[] = 'Goals_UseEventValueAsRevenue';
        $translationKeys[] = 'Goals_EventValueAsRevenueHelp';
        $translationKeys[] = 'Goals_EventValueAsRevenueHelp2';
        $translationKeys[] = 'Events_EventCategory';
        $translationKeys[] = 'Goals_WhereVisitedPageManuallyCallsJavascriptTrackerLearnMore';
        $translationKeys[] = 'Goals_LearnMoreAboutGoalTrackingDocumentation';
        $translationKeys[] = 'Goals_EcommerceReports';
        $translationKeys[] = 'SitesManager_WebsitesManagement';
        $translationKeys[] = 'Goals_CaseSensitive';
        $translationKeys[] = 'Goals_Download';
        $translationKeys[] = 'Events_EventAction';
        $translationKeys[] = 'Events_EventName';
        $translationKeys[] = 'Goals_YouCanEnableEcommerceReports';
        $translationKeys[] = 'Goals_CategoryTextGeneral_Actions';
        $translationKeys[] = 'General_ForExampleShort';
        $translationKeys[] = 'General_Id';
        $translationKeys[] = 'General_Description';
        $translationKeys[] = 'General_ColumnRevenue';
        $translationKeys[] = 'General_Edit';
        $translationKeys[] = 'General_Delete';
        $translationKeys[] = 'General_OperationGreaterThan';
        $translationKeys[] = 'General_Yes';
        $translationKeys[] = 'General_No';
        $translationKeys[] = 'General_OrCancel';
    }
}