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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-01-27 02:46:15 +0300
committerGitHub <noreply@github.com>2020-01-27 02:46:15 +0300
commitd3aabbd01e87c6de2f6c3cff3f8f3f9a30fa9ae3 (patch)
treeba5bf66f4ab8859766af7e0810c7d939554676a3 /plugins/DevicesDetection
parent9f2f380b06b57d28cd41fd789b550fe3e3d204c3 (diff)
Support goal metrics for browser name dimension (#15409)
Diffstat (limited to 'plugins/DevicesDetection')
-rw-r--r--plugins/DevicesDetection/Archiver.php2
-rw-r--r--plugins/DevicesDetection/Columns/BrowserName.php5
-rw-r--r--plugins/DevicesDetection/Reports/GetBrowsers.php1
3 files changed, 7 insertions, 1 deletions
diff --git a/plugins/DevicesDetection/Archiver.php b/plugins/DevicesDetection/Archiver.php
index f03c4e8403..782386cf4a 100644
--- a/plugins/DevicesDetection/Archiver.php
+++ b/plugins/DevicesDetection/Archiver.php
@@ -76,7 +76,7 @@ class Archiver extends \Piwik\Plugin\Archiver
{
$metrics = $this->getLogAggregator()->getMetricsFromVisitByDimension($labelSQL);
- if (in_array($recordName, array(self::DEVICE_TYPE_RECORD_NAME, self::DEVICE_BRAND_RECORD_NAME, self::DEVICE_MODEL_RECORD_NAME))) {
+ if (in_array($recordName, array(self::DEVICE_TYPE_RECORD_NAME, self::DEVICE_BRAND_RECORD_NAME, self::DEVICE_MODEL_RECORD_NAME, self::BROWSER_RECORD_NAME))) {
$labelSQL = str_replace('log_visit.', 'log_conversion.', $labelSQL);
diff --git a/plugins/DevicesDetection/Columns/BrowserName.php b/plugins/DevicesDetection/Columns/BrowserName.php
index 2283db01e8..9a1e59ee23 100644
--- a/plugins/DevicesDetection/Columns/BrowserName.php
+++ b/plugins/DevicesDetection/Columns/BrowserName.php
@@ -60,6 +60,11 @@ class BrowserName extends Base
return \Piwik\Plugins\DevicesDetection\getBrowserName($value);
}
+ public function onAnyGoalConversion(Request $request, Visitor $visitor, $action)
+ {
+ return $visitor->getVisitorColumn($this->columnName);
+ }
+
/**
* @param Request $request
* @param Visitor $visitor
diff --git a/plugins/DevicesDetection/Reports/GetBrowsers.php b/plugins/DevicesDetection/Reports/GetBrowsers.php
index 01045df62e..881f4bfec7 100644
--- a/plugins/DevicesDetection/Reports/GetBrowsers.php
+++ b/plugins/DevicesDetection/Reports/GetBrowsers.php
@@ -23,6 +23,7 @@ class GetBrowsers extends Base
$this->documentation = Piwik::translate('DevicesDetection_WidgetBrowsersDocumentation', '<br />');
$this->order = 5;
$this->subcategoryId = 'DevicesDetection_Software';
+ $this->hasGoalMetrics = true;
}
public function configureView(ViewDataTable $view)