PDF rausgenommen

This commit is contained in:
aschwarz
2023-01-23 11:03:31 +01:00
parent 82d562a322
commit a6523903eb
28078 changed files with 4247552 additions and 2 deletions

View File

@ -0,0 +1,164 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\ProfessionalServices;
use Piwik\Common;
use Piwik\View;
use Piwik\Plugin;
class ProfessionalServices extends \Piwik\Plugin
{
/**
* @see \Piwik\Plugin::registerEvents
*/
public function registerEvents()
{
return array(
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Request.getRenamedModuleAndAction' => 'renameProfessionalServicesModule',
'Template.afterGoalConversionOverviewReport' => array('function' => 'getGoalOverviewPromo', 'after' => true),
'Template.afterGoalCannotAddNewGoal' => array('function' => 'getGoalOverviewPromo', 'after' => true),
'Template.endGoalEditTable' => array('function' => 'getGoalFunnelOverviewPromo', 'after' => true),
'Template.afterEventsReport' => 'getEventsPromo',
'Template.afterCampaignsReport' => 'getCampaignsPromo',
'Template.afterReferrerTypeReport' => 'getReferrerTypePromo',
'Template.afterReferrersKeywordsReport' => 'getSearchKeywordsPerformancePromo',
'Template.afterCustomVariablesReport' => 'getCustomVariablesPromo',
'Template.afterOverlaySidebar' => 'getHeatmapPromo',
'Template.afterVisitorProfileOverview' => 'getSessionRecordingPromo',
);
}
public function getStylesheetFiles(&$stylesheets)
{
$stylesheets[] = 'plugins/ProfessionalServices/stylesheets/widget.less';
}
/**
* @deprecated Can be removed in Piwik 3.0
* @param $module
* @param $action
*/
public function renameProfessionalServicesModule(&$module, &$action)
{
if ($module == 'ProfessionalServices') {
$module = 'ProfessionalServices';
if($action == 'promoPiwikPro') {
$action = 'promoServices';
}
if ($action == 'rssPiwikPro') {
$action = 'rss';
}
}
}
public function isRequestForDashboardWidget()
{
$isWidget = Common::getRequestVar('widget', 0, 'int');
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 (!$this->shouldShowPromoForPlugin('SearchEngineKeywordsPerformance')) {
return;
}
$view = new View('@ProfessionalServices/promoSearchKeywords');
$out .= $view->render();
}
public function getGoalFunnelOverviewPromo(&$out)
{
if ($this->shouldShowPromoForPlugin('Funnels')) {
$view = new View('@ProfessionalServices/promoFunnel');
$out .= $view->render();
}
}
public function getGoalOverviewPromo(&$out)
{
if ($this->shouldShowPromoForPlugin('AbTesting')) {
$view = new View('@ProfessionalServices/promoExperiments.twig');
$out .= $view->render();
}
}
public function getCustomVariablesPromo(&$out)
{
if ($this->shouldShowPromoForPlugin('CustomReports')) {
$view = new View('@ProfessionalServices/promoCustomVariables.twig');
$out .= $view->render();
}
}
public function getEventsPromo(&$out)
{
if ($this->isRequestForDashboardWidget()) {
return;
}
$view = new View('@ProfessionalServices/promoBelowEvents');
$view->displayMediaAnalyticsAd = !$this->isPluginActivated('MediaAnalytics');
$out .= $view->render();
}
public function getCampaignsPromo(&$out)
{
if ($this->isRequestForDashboardWidget()) {
return;
}
$view = new View('@ProfessionalServices/promoBelowCampaigns');
$view->displayMarketingCampaignsReportingAd = !$this->isPluginActivated('MarketingCampaignsReporting');
$view->multiChannelConversionAttributionAd = !$this->isPluginActivated('MultiChannelConversionAttribution') && !empty($_REQUEST['idGoal']);
$out .= $view->render();
}
public function getReferrerTypePromo(&$out)
{
if ($this->shouldShowPromoForPlugin('MultiChannelConversionAttribution') && !empty($_REQUEST['idGoal'])) {
$view = new View('@ProfessionalServices/promoBelowReferrerTypes');
$out .= $view->render();
}
}
private function shouldShowPromoForPlugin($pluginName)
{
return !$this->isPluginActivated($pluginName) && !$this->isRequestForDashboardWidget();
}
private function isPluginActivated($pluginName)
{
return Plugin\Manager::getInstance()->isPluginActivated($pluginName);
}
}

View File

@ -0,0 +1,131 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\ProfessionalServices;
use Piwik\ProfessionalServices\Advertising;
class Promo
{
protected $linkTitles = array('Read more', 'Learn more');
protected $content = array();
public function __construct()
{
$this->content = array(
// A/B Testing
array(
'campaignContent' => 'abTesting',
'title' => 'A/B Testing',
'url' => 'https://matomo.org/recommends/ab-testing-learn-more',
'text' => 'Ever wondered what A/B testing is and why it is so important? Check out how you can increase conversions and sales on your website and app.'
),
array(
'campaignContent' => 'abTesting',
'title' => 'A/B Testing',
'url' => ' https://matomo.org/recommends/ab-testing-website',
'text' => 'Increase revenue and conversions by comparing different versions of your websites or apps, ad detect the winning variation that will grow your business!'
),
// Media Analytics
array(
'campaignContent' => 'mediaAnalytics',
'title' => 'Media Analytics',
'url' => 'https://matomo.org/recommends/media-analytics-website',
'text' => 'Ever wondered how people interact and engage with videos or audios on your website? Well now you can, and it integrates perfectly into your Matomo.',
),
array(
'campaignContent' => 'mediaAnalytics',
'title' => 'Media Analytics',
'url' => 'https://matomo.org/recommends/media-analytics',
'text' => 'Get powerful insights into how your audience watches your videos and listens to your audio. Media Analytics is now available on the Marketplace.',
),
// Form
array(
'campaignContent' => 'formAnalytics',
'title' => 'Form Analytics',
'url' => 'https://matomo.org/recommends/form-analytics',
'text' => 'Increase the conversions on your online forms, by learning everything about your users behavior and their pain points on your forms',
),
// Funnels
array(
'campaignContent' => 'funnels',
'title' => 'Funnels',
'url' => 'https://matomo.org/recommends/conversion-funnels',
'text' => 'Increase your conversions, sales and revenue by understanding your conversion funnels and where your visitors drop off with Funnels for Matomo.'
),
// Piwik training
array(
'campaignContent' => 'userTraining',
'title' => 'Training',
'url' => 'https://matomo.org/training/?pk_campaign=' . Advertising::CAMPAIGN_NAME_PROFESSIONAL_SERVICES . '&pk_source=Piwik_App',
'text' => 'Want to know how to use all the exciting features in Matomo? Try a User training to be up to speed with working with Matomo.'
),
// Keywords performance
array(
'campaignContent' => 'searchKeywords',
'title' => 'Search Keywords',
'url' => 'https://matomo.org/recommends/search-keywords-performance/',
'text' => 'Which queries caused your website to appear in search results? Improve your SEO efforts and monitor your position and performance for each Keyword directly in your Matomo reports.',
),
// Roll-Up Reporting
array(
'campaignContent' => 'rollUp',
'title' => 'Roll-Up Reporting',
'url' => 'https://matomo.org/recommends/roll-up-reporting/',
'text' => 'Did you know you can aggregate the collected data across hundreds of sites and display it in a single dashboard?',
),
// White label
array(
'campaignContent' => 'whiteLabel',
'title' => 'White Label',
'url' => 'https://matomo.org/recommends/white-label/',
'text' => 'Did you know you can give your clients access to their analytics reports where all Matomo-branded widgets are removed? Try the White Label product!',
),
// Enterprise
array(
'campaignContent' => 'bringEnterpriseLevel',
'title' => 'Enterprise',
'url' => 'https://matomo.org/recommends/enterprise/',
'text' => 'Bring your analytics to enterprise level. Upgrade your Matomo platform and receive access to numerous premium features and assistance from experts.'
),
array(
'campaignContent' => 'slowingDown',
'title' => 'Enterprise',
'url' => 'https://matomo.org/recommends/enterprise/',
'text' => 'Is your Matomo slowing down? Matomo experts can help with your server setup!'
),
array(
'campaignContent' => 'discoverPower',
'title' => 'Enterprise',
'url' => 'https://matomo.org/recommends/enterprise/',
'text' => 'Discover the power of open-source combined with enterprise-grade support and premium functionalities.'
),
);
}
public function getLinkTitle()
{
$titles = $this->linkTitles;
shuffle($titles);
return array_shift($titles);
}
public function getContent()
{
$content = $this->content;
shuffle($content);
return array_shift($content);
}
}

View File

@ -0,0 +1,57 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\ProfessionalServices\Widgets;
use Piwik\Container\StaticContainer;
use Piwik\Plugins\ProfessionalServices\Promo;
use Piwik\ProfessionalServices\Advertising;
use Piwik\View;
use Piwik\Widget\WidgetConfig;
class PromoServices extends \Piwik\Widget\Widget
{
/**
* @var Advertising
*/
private $advertising;
/**
* @var Promo
*/
private $promo;
public function __construct(Advertising $advertising, Promo $promo)
{
$this->advertising = $advertising;
$this->promo = $promo;
}
public static function configure(WidgetConfig $config)
{
$config->setCategoryId('About Matomo');
$config->setName('ProfessionalServices_WidgetPremiumServicesForPiwik');
$advertising = StaticContainer::get('Piwik\ProfessionalServices\Advertising');
$config->setIsEnabled($advertising->areAdsForProfessionalServicesEnabled());
}
public function render()
{
$view = new View('@ProfessionalServices/promoServicesWidget');
$promo = $this->promo->getContent();
$view->ctaLinkUrl = $promo['url'];
$view->ctaText = $promo['text'];
$view->ctaTitle = $promo['title'];
$view->ctaLinkTitle = $this->promo->getLinkTitle();
return $view->render();
}
}

View File

@ -0,0 +1,25 @@
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\ProfessionalServices\Widgets;
use Piwik\Widget\WidgetConfig;
class Rss extends \Piwik\Widget\Widget
{
public static function configure(WidgetConfig $config)
{
$config->setCategoryId('About Matomo');
$config->setIsEnabled(false);
}
public function render()
{
return '';
}
}

View File

@ -0,0 +1,13 @@
<?php
use Piwik\Tests\Framework\Mock\ProfessionalServices\Advertising;
use Piwik\Plugins\ProfessionalServices\tests\Framework\Mock\Promo;
return array(
'Piwik\ProfessionalServices\Advertising' => function () {
return new Advertising();
},
'Piwik\Plugins\ProfessionalServices\Promo' => function () {
return new Promo();
}
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -0,0 +1,5 @@
{
"ProfessionalServices": {
"WidgetPremiumServicesForPiwik": "Premium Features & Services for Matomo"
}
}

View File

@ -0,0 +1,4 @@
{
"name": "ProfessionalServices",
"description": "Provides widgets to learn about Professional services and products for Matomo."
}

View File

@ -0,0 +1,36 @@
.promoWidget {
// hard coded background color because image has hardcoded background
background-color: white;
.promo {
padding: 10px;
&:after {
content: '';
clear: both;
visibility: hidden;
}
h2 {
font-size: 20px;
}
}
.text {
overflow: hidden;
}
hr {
margin: 0;
}
.link {
padding: 20px;
}
.btn {
background: @theme-color-link;
}
.icon {
margin-top:20px;
width: 64px;
height: 64px;
float: left;
margin-right: 20px;
}
}

View File

@ -0,0 +1,11 @@
<p style="margin-top:3em" class=" alert-info alert">Did you know?
<br/> <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/tracking-campaigns/">Campaign tracking</a> lets you measure the effectiveness of your marketing campaigns such as emails marketing, paid search, banner ads, affiliates links, etc.
Use the <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/tracking-campaigns/">URL Builder tool</a> to create your links with new URL campaign parameters.
{% if displayMarketingCampaignsReportingAd %}
<br/> Install our <a target="_blank" rel="noreferrer noopener" href="https://plugins.matomo.org/MarketingCampaignsReporting">Marketing Campaigns Reporting plugin</a> to get even more campaigns reports and new segments for up to five marketing channels (campaign, source, medium, keyword, content).
{% endif %}
{% if multiChannelConversionAttributionAd %}
<br />
Discover how much each campaign truly contributes to your success by applying attribution models using the <a target="_blank" rel="noreferrer noopener" href="https://plugins.piwik.org/MarketingCampaignsReporting">Multi Channel Conversion Attribution</a> premium feature.
{% endif %}
</p>

View File

@ -0,0 +1,7 @@
<p style="margin-top:3em" class=" alert-info alert">Did you know?
<br/>Using Events you can measure any user interaction and gain amazing insights into your audience. <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/docs/event-tracking/">Learn more</a>.
<br/> To measure blocks of content such as image galleries, listings or ads: use <a target="_blank" rel="noreferrer noopener" href="https://developer.matomo.org/guides/content-tracking">Content Tracking</a> and see exactly which content is viewed and clicked.
{% if displayMediaAnalyticsAd %}
<br/>When you publish videos or audios, <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/media-analytics-website">Media Analytics gives deep insights into your audience</a> and how they watch your videos or listens to your music.
{% endif %}
</p>

View File

@ -0,0 +1,3 @@
<p style="margin-top:3em" class=" alert-info alert">Did you know?
<br/>You can get advanced insights into how much each of your marking channel truly contributes to your success by applying attribution models using the <a target="_blank" rel="noreferrer noopener" href="https://plugins.piwik.org/MultiChannelConversionAttribution">Multi Channel Conversion Attribution</a> premium feature.
</p>

View File

@ -0,0 +1,3 @@
<p style="margin-top:1em" class=" alert-info alert">Did you know?
<br/> With the <a target="_blank" rel="noreferrer noopener" href="https://plugins.piwik.org/CustomReports">Custom Reports</a> premium feature you can pull out the information you need in a matter of seconds.
</p>

View File

@ -0,0 +1,3 @@
<p style="margin-top:3em" class=" alert-info alert">Did you know?
With <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/ab-testing-learn-more/">A/B Testing for Matomo</a> you can immediately increase conversions and sales by creating different versions of a page to see which one grows your business.
</p>

View File

@ -0,0 +1,5 @@
<p style="margin-top:3em;margin-bottom:3em" class="alert-info alert">Did you know?
A Funnel defines a series of actions that you expect your visitors to take on their way to converting a goal.
<br/>With <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/conversion-funnel/">Funnels for Matomo</a>,
you can easily determine your funnel and see where your visitors drop off and how to focus efforts to increase your conversions.
</p>

View File

@ -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 noopener" href="https://matomo.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>

View File

@ -0,0 +1,6 @@
<p style="margin-top:3em;margin-bottom:3em" class=" alert-info alert">Did you know?<br/>
Use <a target="_blank" rel="noreferrer noopener" href="https://matomo.org/recommends/search-keywords-performance/">Search Keywords Performance</a>
to see all keywords behind 'keyword not defined'.
All keywords searched by your users on Google, Bing and other search engines will be listed
and you can even monitor the SEO position of your website in their search results.
</p>

View File

@ -0,0 +1,13 @@
<div class="promoWidget">
<div class="promo">
<a href="{{ ctaLinkUrl|e('html_attr') }}" target="_blank" rel="noreferrer noopener"><img class="icon" src="plugins/ProfessionalServices/images/promo.png"></a>
<h2>{{ ctaTitle }}</h2>
<p class="text">
<span>{{ ctaText }}</span>
<br /><br />
<a class="btn" href="{{ ctaLinkUrl|e('html_attr') }}" target="_blank" rel="noreferrer noopener">
{{ ctaLinkTitle }}
</a>
</p>
</div>
</div>

View File

@ -0,0 +1,3 @@
<p class="alert-info alert">Did you know?
With <a target="_blank" rel="noreferrer noopener" href="https://matomo.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>