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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-11-14 05:35:04 +0300
committerGitHub <noreply@github.com>2016-11-14 05:35:04 +0300
commit76ceedd1cc47acaeb52053db7edd4c0c5e829d9e (patch)
tree655aaa1820f606f45166b6ab1831c11ccf8474da
parentc51543524d6e8f94043d81a03561b843d4b9c370 (diff)
Linking to plugins (#10859)
-rw-r--r--.gitignore2
-rw-r--r--core/ProfessionalServices/Advertising.php10
-rwxr-xr-xplugins/CoreHome/templates/_donate.twig2
-rw-r--r--plugins/Events/templates/index.twig2
-rw-r--r--plugins/Feedback/templates/index.twig14
-rw-r--r--plugins/Goals/templates/getGoalReportView.twig1
-rw-r--r--plugins/ProfessionalServices/ProfessionalServices.php28
-rw-r--r--plugins/ProfessionalServices/Promo.php108
-rw-r--r--plugins/ProfessionalServices/Widgets.php2
-rw-r--r--plugins/ProfessionalServices/lang/en.json2
m---------plugins/SecurityInfo0
-rw-r--r--plugins/Widgetize/tests/System/WidgetTest.php2
-rw-r--r--tests/PHPUnit/Integration/ProfessionalSupport/AdvertisingTest.php7
13 files changed, 122 insertions, 58 deletions
diff --git a/.gitignore b/.gitignore
index 8a53c53e11..e5748d7c31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,7 @@ php_errors.log
*.tmp
*.pyc
.DS_Store
-
+/.idea/
/bootstrap.php
/build
/composer.phar
diff --git a/core/ProfessionalServices/Advertising.php b/core/ProfessionalServices/Advertising.php
index 07e42c46e4..ef423200ae 100644
--- a/core/ProfessionalServices/Advertising.php
+++ b/core/ProfessionalServices/Advertising.php
@@ -67,16 +67,6 @@ class Advertising
}
/**
- * Get URL for letting people know about upgrade to On premises
- *
- * @return string
- */
- public function getPromoUrlForPiwikProUpgrade()
- {
- return 'https://piwik.org/recommends/piwik-pro-from-app';
- }
-
- /**
* Appends campaign parameters to the given URL for promoting any Professional Support for Piwik service.
*
* @param string $url
diff --git a/plugins/CoreHome/templates/_donate.twig b/plugins/CoreHome/templates/_donate.twig
index 2520a4c2c9..2fcf62962f 100755
--- a/plugins/CoreHome/templates/_donate.twig
+++ b/plugins/CoreHome/templates/_donate.twig
@@ -5,7 +5,7 @@
{% else %}
<p>{{ 'CoreHome_DonateCall1'|translate }}</p>
<p><strong>{{ 'CoreHome_DonateCall2'|translate }}</strong></p>
- <p>{{ 'CoreHome_DonateCall4'|translate('<strong>','</strong>', '<a target="_blank" rel="nofollow" href="https://plugins.piwik.org/premium"><strong>', '</strong></a>')|raw }}</p>
+ <p>{{ 'CoreHome_DonateCall4'|translate('<strong>','</strong>', '<a target="_blank" rel="nofollow" href="https://piwik.org/recommends/premium-plugins"><strong>', '</strong></a>')|raw }}</p>
{% endif %}
</div>
diff --git a/plugins/Events/templates/index.twig b/plugins/Events/templates/index.twig
index a12afb651a..7d60bb67f4 100644
--- a/plugins/Events/templates/index.twig
+++ b/plugins/Events/templates/index.twig
@@ -1,2 +1,4 @@
{{ leftMenuReports|raw }}
+{{ postEvent("Template.afterEventsReport") }}
+
diff --git a/plugins/Feedback/templates/index.twig b/plugins/Feedback/templates/index.twig
index 74818d9213..28fb27960c 100644
--- a/plugins/Feedback/templates/index.twig
+++ b/plugins/Feedback/templates/index.twig
@@ -48,7 +48,7 @@
<p> &bull; {{ 'Feedback_ProfessionalServicesOptimizationMaintenance'|translate }}</p>
<p> &bull; {{ 'Feedback_ProfessionalServicesPhoneEmailSupport'|translate }}</p>
<p> &bull; {{ 'Feedback_ProfessionalServicesTraining'|translate }}</p>
- <p> &bull; {{ 'Feedback_ProfessionalServicesPremiumFeatures'|translate }}</p>
+ <p> &bull; <a rel='noreferrer' target='_blank' href='https://piwik.org/recommends/premium-plugins'>{{ 'Feedback_ProfessionalServicesPremiumFeatures'|translate }}</a></p>
<p> &bull; {{ 'Feedback_ProfessionalServicesCustomDevelopment'|translate }}</p>
<p> &bull; {{ 'Feedback_ProfessionalServicesAnalystConsulting'|translate }}</p>
</div>
@@ -61,6 +61,18 @@
<input type="submit" value="{{ 'Feedback_ContactUs'|translate }}">
</form>
+ <h2>Premium products</h2>
+
+ <p>Grow your business, understand your audience better and increase your sales and conversions with a premium plugin for Piwik:
+ <p> &bull; <a rel='noreferrer' target='_blank' href='https://piwik.org/recommends/ab-testing-learn-more/'>A/B Testing Platform for Piwik Analytics</a>.
+ </p>
+ <p> &bull; <a rel='noreferrer' target='_blank' href='https://piwik.org/recommends/media-analytics-website/'>Powerful Video Analytics and Audio Analytics</a>.
+ </p>
+ <p> &bull; <a rel='noreferrer' target='_blank' href='https://piwik.org/recommends/activity-log/'>Audit log of user activities happening in your Piwik</a>.
+ </p>
+ <p> &bull; <strong><a rel='noreferrer' target='_blank' href='https://piwik.org/recommends/premium-plugins'>All premium plugins.</a></strong>
+ </p>
+
<h2>{{ 'Feedback_DoYouHaveBugReportOrFeatureRequest'|translate }}</h2>
<div class="header_full">
diff --git a/plugins/Goals/templates/getGoalReportView.twig b/plugins/Goals/templates/getGoalReportView.twig
index f6ee50e6dd..43201fef7a 100644
--- a/plugins/Goals/templates/getGoalReportView.twig
+++ b/plugins/Goals/templates/getGoalReportView.twig
@@ -41,7 +41,6 @@
<a href="javascript:;" class="segmentedlog" onclick="SegmentedVisitorLog.show('Goals.getMetrics', 'visitConvertedGoalId=={{ idGoal }}', {})">
{{ 'Live_RowActionTooltipWithDimension'|translate('General_Goal'|translate) }}
</a>
-
{% endif %}
{{ postEvent("Template.afterGoalConversionOverviewReport") }}
diff --git a/plugins/ProfessionalServices/ProfessionalServices.php b/plugins/ProfessionalServices/ProfessionalServices.php
index 203c3bb6f6..3af6735797 100644
--- a/plugins/ProfessionalServices/ProfessionalServices.php
+++ b/plugins/ProfessionalServices/ProfessionalServices.php
@@ -18,6 +18,8 @@ class ProfessionalServices extends \Piwik\Plugin
return array(
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Request.getRenamedModuleAndAction' => 'renameProfessionalServicesModule',
+ 'Template.afterGoalConversionOverviewReport' => 'getGoalOverviewPromo',
+ 'Template.afterEventsReport' => 'getEventsPromo',
);
}
@@ -45,4 +47,30 @@ class ProfessionalServices extends \Piwik\Plugin
}
}
}
+
+
+ public function getGoalOverviewPromo(&$out)
+ {
+ if(\Piwik\Plugin\Manager::getInstance()->isPluginActivated('AbTesting')) {
+ return;
+ }
+
+ $out .= '
+ <p style="margin-top:3em" class=" alert-info alert">Did you know?
+ With <a target="_blank" rel="noreferrer" href="https://piwik.org/recommends/ab-testing-learn-more/">A/B Testing for Piwik</a> you can immediately increase conversions and sales by creating different versions of a page to see which grows your business.
+ </p>
+ ';
+ }
+
+ public function getEventsPromo(&$out)
+ {
+ $inlineAd = '';
+ if(!\Piwik\Plugin\Manager::getInstance()->isPluginActivated('MediaAnalytics')) {
+ $inlineAd = '<br/>When you publish videos or audios, <a target="_blank" rel="noreferrer" href="https://piwik.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.';
+ }
+ $out .= '<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" href="?module=Proxy&action=redirect&url=http://piwik.org/docs/event-tracking/">Learn more</a>.
+ ' . $inlineAd . '
+ </p>';
+ }
}
diff --git a/plugins/ProfessionalServices/Promo.php b/plugins/ProfessionalServices/Promo.php
index 36f8ae155d..afbe6d0bd0 100644
--- a/plugins/ProfessionalServices/Promo.php
+++ b/plugins/ProfessionalServices/Promo.php
@@ -8,44 +8,84 @@
namespace Piwik\Plugins\ProfessionalServices;
+use Piwik\ProfessionalServices\Advertising;
+
class Promo
{
protected $linkTitles = array('Read more', 'Learn more');
- protected $content = array(
- array(
- 'campaignContent' => 'discoverPower',
- 'text' => 'Discover the power of open-source combined with enterprise-grade support and premium functionalities.'
- ),
- array(
- 'campaignContent' => 'bringEnterpriseLevel',
- 'text' => 'Bring your analytics to enterprise level. Upgrade your Piwik platform and receive access to numerous premium features and assistance from experts.'
- ),
- array(
- 'campaignContent' => 'funnelAnalytics',
- 'text' => 'Want Funnel Analytics? Get Premium features and enterprise-grade support.'
- ),
- array(
- 'campaignContent' => 'monitoringAndIncident',
- 'text' => 'Do you need 24/7 Monitoring and Incident Handling for your Piwik? Get Premium features and enterprise-grade support.'
- ),
- array(
- 'campaignContent' => 'slowingDown',
- 'text' => 'Is your Piwik slowing down? Piwik experts can help with your server setup!'
- ),
- array(
- 'campaignContent' => 'excitingFeatures',
- 'text' => 'Want to know how to use all the exciting features in Piwik? Try a User training to be up to speed with working with Piwik.'
- ),
- array(
- 'campaignContent' => 'slowingDown',
- 'text' => 'Did you know you can adjust the look and feel of Piwik to your brand, and even replace "Piwik" with your product name? Try the White Label product!',
- ),
- array(
- 'campaignContent' => 'metaSites',
- 'text' => 'Did you know you can aggregate the tracked data across hundreds of sites and display it in a single dashboard? Get Premium features and enterprise-grade support.',
- ),
- );
+ protected $content = array();
+
+ public function __construct()
+ {
+ $this->content = array(
+ // A/B Testing
+ array(
+ 'campaignContent' => 'abTesting',
+ 'url' => 'https://piwik.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',
+ 'url' => ' https://piwik.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',
+ 'url' => 'https://piwik.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 Piwik.',
+ ),
+
+ array(
+ 'campaignContent' => 'mediaAnalytics',
+ 'url' => 'https://piwik.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.',
+ ),
+
+ // Piwik training
+ array(
+ 'campaignContent' => 'userTraining',
+ 'url' => 'https://piwik.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 Piwik? Try a User training to be up to speed with working with Piwik.'
+ ),
+
+
+ // Piwik PRO
+ // https://piwik.org/recommends/piwik-pro-from-app
+ array(
+ 'campaignContent' => 'discoverPower',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Discover the power of open-source combined with enterprise-grade support and premium functionalities.'
+ ),
+ array(
+ 'campaignContent' => 'bringEnterpriseLevel',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Bring your analytics to enterprise level. Upgrade your Piwik platform and receive access to numerous premium features and assistance from experts.'
+ ),
+ array(
+ 'campaignContent' => 'monitoringAndIncident',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Do you need 24/7 Monitoring and Incident Handling for your Piwik? Get Premium features and enterprise-grade support.'
+ ),
+ array(
+ 'campaignContent' => 'slowingDown',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Is your Piwik slowing down? Piwik experts can help with your server setup!'
+ ),
+ array(
+ 'campaignContent' => 'whiteLabel',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Did you know you can adjust the look and feel of Piwik to your brand, and even replace "Piwik" with your product name? Try the White Label product!',
+ ),
+ array(
+ 'campaignContent' => 'metaSites',
+ 'url' => 'https://piwik.org/recommends/piwik-pro-from-app',
+ 'text' => 'Did you know you can aggregate the collected data across hundreds of sites and display it in a single dashboard? Get Premium features and enterprise-grade support.',
+ )
+ );
+ }
public function getLinkTitle()
{
diff --git a/plugins/ProfessionalServices/Widgets.php b/plugins/ProfessionalServices/Widgets.php
index b1abc5e7da..18923a76de 100644
--- a/plugins/ProfessionalServices/Widgets.php
+++ b/plugins/ProfessionalServices/Widgets.php
@@ -51,7 +51,7 @@ class Widgets extends \Piwik\Plugin\Widgets
$promo = $this->promo->getContent();
- $view->ctaLinkUrl = $this->advertising->getPromoUrlForPiwikProUpgrade();
+ $view->ctaLinkUrl = $promo['url'];
$view->ctaText = $promo['text'];
$view->ctaLinkTitle = $this->promo->getLinkTitle();
diff --git a/plugins/ProfessionalServices/lang/en.json b/plugins/ProfessionalServices/lang/en.json
index 1f275d103f..86d44f4d0a 100644
--- a/plugins/ProfessionalServices/lang/en.json
+++ b/plugins/ProfessionalServices/lang/en.json
@@ -1,5 +1,5 @@
{
"ProfessionalServices": {
- "WidgetProfessionalServicesForPiwik": "Professional Services for Piwik"
+ "WidgetProfessionalServicesForPiwik": "Premium Products & Services for Piwik"
}
} \ No newline at end of file
diff --git a/plugins/SecurityInfo b/plugins/SecurityInfo
-Subproject 9ae010770a8b3c5ad369d083c52dd7575af3ae6
+Subproject 6f8f8a75fa6e2835f9bae5b7d25610afea6b2e4
diff --git a/plugins/Widgetize/tests/System/WidgetTest.php b/plugins/Widgetize/tests/System/WidgetTest.php
index c73ebf25e6..115ac790f7 100644
--- a/plugins/Widgetize/tests/System/WidgetTest.php
+++ b/plugins/Widgetize/tests/System/WidgetTest.php
@@ -836,7 +836,7 @@ class WidgetTest extends SystemTestCase
),
),
array (
- 'name' => 'Professional Services for Piwik',
+ 'name' => 'Premium Products & Services for Piwik',
'uniqueId' => 'widgetProfessionalServicespromoServices',
'parameters' =>
array (
diff --git a/tests/PHPUnit/Integration/ProfessionalSupport/AdvertisingTest.php b/tests/PHPUnit/Integration/ProfessionalSupport/AdvertisingTest.php
index d8f728d051..6a83038e14 100644
--- a/tests/PHPUnit/Integration/ProfessionalSupport/AdvertisingTest.php
+++ b/tests/PHPUnit/Integration/ProfessionalSupport/AdvertisingTest.php
@@ -80,13 +80,6 @@ class AdvertisingTest extends IntegrationTestCase
$this->assertTrue($enabled->areAdsForProfessionalServicesEnabled());
}
- public function test_getPromoUrlForOnPremises_WithoutContent()
- {
- $link = $this->advertising->getPromoUrlForPiwikProUpgrade();
-
- $this->assertSame('https://piwik.org/recommends/piwik-pro-from-app', $link);
- }
-
public function test_addPromoCampaignParametersToUrl_withoutContentWithoutQuery()
{
$link = $this->advertising->addPromoCampaignParametersToUrl($this->exampleUrl, 'MyName', 'Installation_Start');