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:
authorStefan Giehl <stefan@matomo.org>2020-10-19 20:15:00 +0300
committerGitHub <noreply@github.com>2020-10-19 20:15:00 +0300
commit619ee9b48c5f11bbea38a8cf35f4a06b8fba0e11 (patch)
treef193503258cc0cf7a825ae2786ace92e1022691e /plugins/Goals
parent85618037852baa54631fbc9fbb42170afcde7553 (diff)
Adds measuarable settings to disable visits log and visitor profile (#16561)
* Adds measuarable settings to disable visits log and visitor profile * updates expected test files * Adds some UI tests to check deactivating visitor log / profile works * code improvements * more ui tests * Adds global system settings to disable visits log / profile * adds UI tests for system setting * updates expected screenshots * code improvement * improve tests * reset custom logo usage after test * updates expected screenshots * use transient cache
Diffstat (limited to 'plugins/Goals')
-rw-r--r--plugins/Goals/Controller.php3
-rw-r--r--plugins/Goals/templates/conversionOverview.twig2
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index 00e0e57925..02f8ee5c9e 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -15,6 +15,8 @@ use Piwik\DataTable\Renderer\Json;
use Piwik\DataTable\Filter\AddColumnsProcessedMetricsGoal;
use Piwik\FrontController;
use Piwik\Piwik;
+use Piwik\Plugin\Manager;
+use Piwik\Plugins\Live\Live;
use Piwik\Plugins\Referrers\API as APIReferrers;
use Piwik\Translation\Translator;
use Piwik\View;
@@ -90,6 +92,7 @@ class Controller extends \Piwik\Plugin\Controller
$view->conversion_rate_returning = $this->formatConversionRate($goalMetrics, 'conversion_rate_returning_visit');
$view->conversion_rate_new = $this->formatConversionRate($goalMetrics, 'conversion_rate_new_visit');
$view->idGoal = $idGoal;
+ $view->visitorLogEnabled = Manager::getInstance()->isPluginActivated('Live') && Live::isVisitorLogEnabled($this->idSite);
return $view->render();
}
diff --git a/plugins/Goals/templates/conversionOverview.twig b/plugins/Goals/templates/conversionOverview.twig
index 1daa4dbb31..1743441c68 100644
--- a/plugins/Goals/templates/conversionOverview.twig
+++ b/plugins/Goals/templates/conversionOverview.twig
@@ -15,9 +15,11 @@
, {{ 'Goals_NewVisitorsConversionRateIs'|translate("<strong>"~conversion_rate_new~"</strong>")|raw }}
</li>
</ul>
+{% if visitorLogEnabled %}
<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>
+{% endif %}
{{ postEvent("Template.afterGoalConversionOverviewReport") }}
<br style="clear:left"/>