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:
authorTim-Hinnerk Heuer <tim@innocraft.com>2021-09-14 00:55:10 +0300
committerGitHub <noreply@github.com>2021-09-14 00:55:10 +0300
commit022c77e7290bd7cee76a84518cf4147aa9b352bf (patch)
tree70cd03eb255f869815d7da12353f756ef9c2d24f /plugins
parent2fd2c0cdbdb7f190e07f683dc34dbd9773d43fa1 (diff)
add promotion for seo web vitals, add campaign for Heatmaps and Sessiā€¦ (#17979)
* add promotion for seo web vitals, add campaign for Heatmaps and Session Recording fixes #17975 * improve naming * clarify naming of events * update ui-screenshot expected images * only show once on performance page * update ui-test screenshot
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PagePerformance/Reports/Get.php10
-rw-r--r--plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_load.png4
-rw-r--r--plugins/ProfessionalServices/ProfessionalServices.php10
-rw-r--r--plugins/ProfessionalServices/Promo.php6
-rw-r--r--plugins/ProfessionalServices/templates/promoSEOWebVitals.twig8
-rw-r--r--plugins/Referrers/Reports/GetSearchEngines.php8
6 files changed, 44 insertions, 2 deletions
diff --git a/plugins/PagePerformance/Reports/Get.php b/plugins/PagePerformance/Reports/Get.php
index b1e09152cf..673a294f83 100644
--- a/plugins/PagePerformance/Reports/Get.php
+++ b/plugins/PagePerformance/Reports/Get.php
@@ -8,9 +8,11 @@
*/
namespace Piwik\Plugins\PagePerformance\Reports;
+use Piwik\EventDispatcher;
use Piwik\Piwik;
use Piwik\Plugin\ViewDataTable;
use Piwik\Plugins\CoreVisualizations\Visualizations\Sparklines;
+use Piwik\Plugins\Installation\View;
use Piwik\Plugins\PagePerformance\Metrics;
use Piwik\Plugins\PagePerformance\Visualizations\JqplotGraph\StackedBarEvolution;
use Piwik\Plugins\PagePerformance\Visualizations\PerformanceColumns;
@@ -85,6 +87,7 @@ class Get extends \Piwik\Plugin\Report
$view->config->columns_to_display = array_keys(Metrics::getAllPagePerformanceMetrics());
$view->config->setNotLinkableWithAnyEvolutionGraph();
+ $this->configureFooterMessage($view);
}
}
@@ -95,4 +98,11 @@ class Get extends \Piwik\Plugin\Report
$view->config->addSparklineMetric([$metric], $count++);
}
}
+
+ private function configureFooterMessage(ViewDataTable $view)
+ {
+ $out = '';
+ EventDispatcher::getInstance()->postEvent('Template.afterPagePerformanceReport', array(&$out));
+ $view->config->show_footer_message = $out;
+ }
} \ No newline at end of file
diff --git a/plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_load.png b/plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_load.png
index 1b69a16338..7c36b6750f 100644
--- a/plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_load.png
+++ b/plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_load.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:682ee95a66dd23c16fcbc544537f937ed41d03b893cdd3f8767979784247f4e6
-size 129795
+oid sha256:12b7459c5dfc8a86fd61926eccd9b72a22097d0dcb294e439586970260cc39f9
+size 142724
diff --git a/plugins/ProfessionalServices/ProfessionalServices.php b/plugins/ProfessionalServices/ProfessionalServices.php
index a2d96f8b28..32cb4f422c 100644
--- a/plugins/ProfessionalServices/ProfessionalServices.php
+++ b/plugins/ProfessionalServices/ProfessionalServices.php
@@ -31,6 +31,8 @@ class ProfessionalServices extends \Piwik\Plugin
'Template.afterCustomVariablesReport' => 'getCustomVariablesPromo',
'Template.afterOverlaySidebar' => 'getHeatmapPromo',
'Template.afterVisitorProfileOverview' => 'getSessionRecordingPromo',
+ 'Template.afterPagePerformanceReport' => 'getSeoWebVitalsPromo',
+ 'Template.afterSearchEngines' => 'getSeoWebVitalsPromo',
);
}
@@ -140,4 +142,12 @@ class ProfessionalServices extends \Piwik\Plugin
return Plugin\Manager::getInstance()->isPluginActivated($pluginName);
}
+ public function getSeoWebVitalsPromo(&$out)
+ {
+ if ($this->shouldShowPromoForPlugin('SEOWebVitals')) {
+ $view = new View('@ProfessionalServices/promoSEOWebVitals');
+ $out .= $view->render();
+ }
+ }
+
}
diff --git a/plugins/ProfessionalServices/Promo.php b/plugins/ProfessionalServices/Promo.php
index 8cc2e01e4d..f2ac24a481 100644
--- a/plugins/ProfessionalServices/Promo.php
+++ b/plugins/ProfessionalServices/Promo.php
@@ -103,6 +103,12 @@ class Promo
'url' => 'https://matomo.org/recommends/enterprise/',
'text' => 'Discover the power of open-source combined with enterprise-grade support and premium functionalities.'
),
+ array(
+ 'campaignContent' => 'heatmapsAndSessionRecordings',
+ 'title' => 'Heatmaps and for Session Recordings',
+ 'url' => 'https://matomo.org/recommends/heatmap-session-recording-learn-more/',
+ 'text' => 'Truly understand your visitors by seeing where they click, hover, type and scroll. Replay their actions in a video and ultimately increase conversions.'
+ ),
);
}
diff --git a/plugins/ProfessionalServices/templates/promoSEOWebVitals.twig b/plugins/ProfessionalServices/templates/promoSEOWebVitals.twig
new file mode 100644
index 0000000000..bf85b5edc9
--- /dev/null
+++ b/plugins/ProfessionalServices/templates/promoSEOWebVitals.twig
@@ -0,0 +1,8 @@
+<p class="alert-info alert">Did you know?<br />
+ Use
+ <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/seo-web-vitals/">
+ SEO Web Vitals
+ </a>
+ to improve your website performance, rank higher in search results and optimise your visitor
+ experience with SEO Web Vitals.
+</p>
diff --git a/plugins/Referrers/Reports/GetSearchEngines.php b/plugins/Referrers/Reports/GetSearchEngines.php
index 36eab27efd..4392394764 100644
--- a/plugins/Referrers/Reports/GetSearchEngines.php
+++ b/plugins/Referrers/Reports/GetSearchEngines.php
@@ -8,6 +8,7 @@
*/
namespace Piwik\Plugins\Referrers\Reports;
+use Piwik\EventDispatcher;
use Piwik\Piwik;
use Piwik\Plugin\ViewDataTable;
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
@@ -39,6 +40,13 @@ class GetSearchEngines extends Base
if ($view->isViewDataTableId(HtmlTable::ID)) {
$view->config->disable_subtable_when_show_goals = true;
}
+ $this->configureFooterMessage($view);
}
+ private function configureFooterMessage(ViewDataTable $view)
+ {
+ $out = '';
+ EventDispatcher::getInstance()->postEvent('Template.afterSearchEngines', array(&$out));
+ $view->config->show_footer_message = $out;
+ }
}