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>2017-05-13 01:51:50 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-05-13 01:51:50 +0300
commit716752b01040da6fc3b2a9e396d8e5cee7e5663a (patch)
tree24199031037f7b186e267dd31c16218f41d7f0c9 /plugins/ProfessionalServices
parent1d6eba632ff0412d12d4de83f4f369377a17d6c2 (diff)
Add more plugin links (#11684)
* Add more plugin links * added missing templates * consistent font size * UI tests show the new messages
Diffstat (limited to 'plugins/ProfessionalServices')
-rw-r--r--plugins/ProfessionalServices/ProfessionalServices.php51
-rw-r--r--plugins/ProfessionalServices/templates/promoHeatmaps.twig3
-rw-r--r--plugins/ProfessionalServices/templates/promoSessionRecordings.twig3
3 files changed, 47 insertions, 10 deletions
diff --git a/plugins/ProfessionalServices/ProfessionalServices.php b/plugins/ProfessionalServices/ProfessionalServices.php
index 5dd848e61d..d11bc22b38 100644
--- a/plugins/ProfessionalServices/ProfessionalServices.php
+++ b/plugins/ProfessionalServices/ProfessionalServices.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\ProfessionalServices;
use Piwik\Common;
use Piwik\View;
+use Piwik\Plugin;
class ProfessionalServices extends \Piwik\Plugin
{
@@ -26,6 +27,8 @@ class ProfessionalServices extends \Piwik\Plugin
'Template.endGoalEditTable' => array('function' => 'getGoalFunnelOverviewPromo', 'after' => true),
'Template.afterEventsReport' => 'getEventsPromo',
'Template.afterReferrersKeywordsReport' => 'getSearchKeywordsPerformancePromo',
+ 'Template.afterOverlaySidebar' => 'getHeatmapPromo',
+ 'Template.afterVisitorProfileOverview' => 'getSessionRecordingPromo',
);
}
@@ -48,7 +51,7 @@ class ProfessionalServices extends \Piwik\Plugin
$action = 'promoServices';
}
- if($action == 'rssPiwikPro') {
+ if ($action == 'rssPiwikPro') {
$action = 'rss';
}
}
@@ -60,10 +63,29 @@ class ProfessionalServices extends \Piwik\Plugin
return $isWidget;
}
+ public function getHeatmapPromo(&$out)
+ {
+ if (!$this->shouldShowPromoForPlugin('HeatmapSessionRecording')) {
+ return;
+ }
+
+ $view = new View('@ProfessionalServices/promoHeatmaps');
+ $out .= $view->render();
+ }
+
+ public function getSessionRecordingPromo(&$out)
+ {
+ if (!$this->shouldShowPromoForPlugin('HeatmapSessionRecording')) {
+ return;
+ }
+
+ $view = new View('@ProfessionalServices/promoSessionRecordings');
+ $out .= $view->render();
+ }
+
public function getSearchKeywordsPerformancePromo(&$out)
{
- if(\Piwik\Plugin\Manager::getInstance()->isPluginActivated('SearchEngineKeywordsPerformance')
- || $this->isRequestForDashboardWidget()) {
+ if (!$this->shouldShowPromoForPlugin('SearchEngineKeywordsPerformance')) {
return;
}
@@ -73,8 +95,7 @@ class ProfessionalServices extends \Piwik\Plugin
public function getGoalFunnelOverviewPromo(&$out)
{
- if(\Piwik\Plugin\Manager::getInstance()->isPluginActivated('Funnels')
- || $this->isRequestForDashboardWidget()) {
+ if (!$this->shouldShowPromoForPlugin('Funnels')) {
return;
}
@@ -82,11 +103,9 @@ class ProfessionalServices extends \Piwik\Plugin
$out .= $view->render();
}
-
public function getGoalOverviewPromo(&$out)
{
- if(\Piwik\Plugin\Manager::getInstance()->isPluginActivated('AbTesting')
- || $this->isRequestForDashboardWidget()) {
+ if (!$this->shouldShowPromoForPlugin('AbTesting')) {
return;
}
@@ -96,11 +115,23 @@ class ProfessionalServices extends \Piwik\Plugin
public function getEventsPromo(&$out)
{
- if($this->isRequestForDashboardWidget()) {
+ if ($this->isRequestForDashboardWidget()) {
return;
}
+
$view = new View('@ProfessionalServices/promoBelowEvents');
- $view->displayMediaAnalyticsAd = !\Piwik\Plugin\Manager::getInstance()->isPluginActivated('MediaAnalytics');
+ $view->displayMediaAnalyticsAd = !$this->isPluginActivated('MediaAnalytics');
$out .= $view->render();
}
+
+ private function shouldShowPromoForPlugin($pluginName)
+ {
+ return !$this->isPluginActivated($pluginName) && !$this->isRequestForDashboardWidget();
+ }
+
+ private function isPluginActivated($pluginName)
+ {
+ return Plugin\Manager::getInstance()->isPluginActivated($pluginName);
+ }
+
}
diff --git a/plugins/ProfessionalServices/templates/promoHeatmaps.twig b/plugins/ProfessionalServices/templates/promoHeatmaps.twig
new file mode 100644
index 0000000000..7aab5fe6c5
--- /dev/null
+++ b/plugins/ProfessionalServices/templates/promoHeatmaps.twig
@@ -0,0 +1,3 @@
+<p style="margin-top:24px;font-size:13px;" class="alert-info alert">Did you know?
+ With <a target="_blank" rel="noreferrer" href="https://piwik.org/recommends/heatmap-session-recording-learn-more/">Heatmap & Session Recording</a> you understand your visitors much better. See where your visitors click, move the mouse, scroll, type, and more.
+</p>
diff --git a/plugins/ProfessionalServices/templates/promoSessionRecordings.twig b/plugins/ProfessionalServices/templates/promoSessionRecordings.twig
new file mode 100644
index 0000000000..b43bb1af32
--- /dev/null
+++ b/plugins/ProfessionalServices/templates/promoSessionRecordings.twig
@@ -0,0 +1,3 @@
+<p style="margin-top:8px" class="alert-info alert">Did you know?
+ With <a target="_blank" rel="noreferrer" href="https://piwik.org/recommends/heatmap-session-recording-learn-more/">Heatmap & Session Recording</a> you can record all clicks, mouse movements, scrolls and form interactions of your visitors and replay them in a video to truly understand your visitors.
+</p> \ No newline at end of file