diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2017-10-04 02:01:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 02:01:25 +0300 |
commit | 0e6780eb97e3de95f9dbb8412ee91a3a570696b4 (patch) | |
tree | 71c7fb4dc13d6d04873d275138efd87356e6b7a6 | |
parent | 9af4e95aa976f3a6533e95b776b5298f73e5f916 (diff) |
Improve promo widget (#12145)
* improve promo widget
* fix tests
-rw-r--r-- | plugins/ProfessionalServices/Promo.php | 13 | ||||
-rw-r--r-- | plugins/ProfessionalServices/Widgets/PromoServices.php | 3 | ||||
-rw-r--r-- | plugins/ProfessionalServices/images/promo.png | bin | 2349 -> 8091 bytes | |||
-rw-r--r-- | plugins/ProfessionalServices/lang/en.json | 2 | ||||
-rw-r--r-- | plugins/ProfessionalServices/stylesheets/widget.less | 11 | ||||
-rw-r--r-- | plugins/ProfessionalServices/templates/promoServicesWidget.twig | 5 | ||||
-rwxr-xr-x | tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml | 2 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/DashboardManager_create_new.png | 4 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/Dashboard_reset.png | 4 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png | 4 |
10 files changed, 35 insertions, 13 deletions
diff --git a/plugins/ProfessionalServices/Promo.php b/plugins/ProfessionalServices/Promo.php index d163843627..ee480776f6 100644 --- a/plugins/ProfessionalServices/Promo.php +++ b/plugins/ProfessionalServices/Promo.php @@ -22,11 +22,13 @@ class Promo // A/B Testing array( 'campaignContent' => 'abTesting', + 'title' => 'A/B Testing', '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', + 'title' => 'A/B Testing', '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!' ), @@ -34,11 +36,13 @@ class Promo // Media Analytics array( 'campaignContent' => 'mediaAnalytics', + 'title' => 'Media Analytics', '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', + 'title' => 'Media Analytics', '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.', ), @@ -46,6 +50,7 @@ class Promo // Form array( 'campaignContent' => 'formAnalytics', + 'title' => 'Form Analytics', 'url' => 'https://piwik.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', ), @@ -53,6 +58,7 @@ class Promo // Funnels array( 'campaignContent' => 'funnels', + 'title' => 'Funnels', 'url' => 'https://piwik.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 Piwik.' ), @@ -60,40 +66,47 @@ class Promo // Piwik training array( 'campaignContent' => 'userTraining', + 'title' => 'Training', '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.' ), // Keywords performance array( 'campaignContent' => 'searchKeywords', + 'title' => 'Search Keywords', 'url' => 'https://piwik.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 Piwik reports.', ), // Roll-Up Reporting array( 'campaignContent' => 'rollUp', + 'title' => 'Roll-Up Reporting', 'url' => 'https://piwik.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://piwik.org/recommends/white-label/', 'text' => 'Did you know you can give your clients access to their analytics reports where all Piwik-branded widgets are removed? Try the White Label product!', ), // Enterprise array( 'campaignContent' => 'bringEnterpriseLevel', + 'title' => 'Enterprise', 'url' => 'https://piwik.org/recommends/enterprise/', 'text' => 'Bring your analytics to enterprise level. Upgrade your Piwik platform and receive access to numerous premium features and assistance from experts.' ), array( 'campaignContent' => 'slowingDown', + 'title' => 'Enterprise', 'url' => 'https://piwik.org/recommends/enterprise/', 'text' => 'Is your Piwik slowing down? Piwik experts can help with your server setup!' ), array( 'campaignContent' => 'discoverPower', + 'title' => 'Enterprise', 'url' => 'https://piwik.org/recommends/enterprise/', 'text' => 'Discover the power of open-source combined with enterprise-grade support and premium functionalities.' ), diff --git a/plugins/ProfessionalServices/Widgets/PromoServices.php b/plugins/ProfessionalServices/Widgets/PromoServices.php index 8a34d5500e..35eca8d35a 100644 --- a/plugins/ProfessionalServices/Widgets/PromoServices.php +++ b/plugins/ProfessionalServices/Widgets/PromoServices.php @@ -35,7 +35,7 @@ class PromoServices extends \Piwik\Widget\Widget public static function configure(WidgetConfig $config) { $config->setCategoryId('About Piwik'); - $config->setName('ProfessionalServices_WidgetProfessionalServicesForPiwik'); + $config->setName('ProfessionalServices_WidgetPremiumServicesForPiwik'); $advertising = StaticContainer::get('Piwik\ProfessionalServices\Advertising'); $config->setIsEnabled($advertising->areAdsForProfessionalServicesEnabled()); @@ -49,6 +49,7 @@ class PromoServices extends \Piwik\Widget\Widget $view->ctaLinkUrl = $promo['url']; $view->ctaText = $promo['text']; + $view->ctaTitle = $promo['title']; $view->ctaLinkTitle = $this->promo->getLinkTitle(); return $view->render(); diff --git a/plugins/ProfessionalServices/images/promo.png b/plugins/ProfessionalServices/images/promo.png Binary files differindex ac15b596df..1a2ecd4adb 100644 --- a/plugins/ProfessionalServices/images/promo.png +++ b/plugins/ProfessionalServices/images/promo.png diff --git a/plugins/ProfessionalServices/lang/en.json b/plugins/ProfessionalServices/lang/en.json index 86d44f4d0a..9b390d0a4d 100644 --- a/plugins/ProfessionalServices/lang/en.json +++ b/plugins/ProfessionalServices/lang/en.json @@ -1,5 +1,5 @@ { "ProfessionalServices": { - "WidgetProfessionalServicesForPiwik": "Premium Products & Services for Piwik" + "WidgetPremiumServicesForPiwik": "Premium Features & Services for Piwik" } }
\ No newline at end of file diff --git a/plugins/ProfessionalServices/stylesheets/widget.less b/plugins/ProfessionalServices/stylesheets/widget.less index fdb9cb1eae..ab99bd4f16 100644 --- a/plugins/ProfessionalServices/stylesheets/widget.less +++ b/plugins/ProfessionalServices/stylesheets/widget.less @@ -3,22 +3,29 @@ background-color: white; .promo { - padding: 20px; + padding: 10px; &:after { content: ''; clear: both; visibility: hidden; } + + h2 { + font-size: 20px; + } } .text { overflow: hidden; } hr { - margin: 0px; + margin: 0; } .link { padding: 20px; } + .btn { + background: @theme-color-link; + } .icon { margin-top:20px; width: 64px; diff --git a/plugins/ProfessionalServices/templates/promoServicesWidget.twig b/plugins/ProfessionalServices/templates/promoServicesWidget.twig index 67f87df40a..29edd9358f 100644 --- a/plugins/ProfessionalServices/templates/promoServicesWidget.twig +++ b/plugins/ProfessionalServices/templates/promoServicesWidget.twig @@ -1,8 +1,9 @@ <div class="promoWidget"> <div class="promo"> - <img class="icon" src="plugins/ProfessionalServices/images/promo.png"> + <a href="{{ ctaLinkUrl|e('html_attr') }}" target="_blank" rel="noreferrer"><img class="icon" src="plugins/ProfessionalServices/images/promo.png"></a> + <h2>{{ ctaTitle }}</h2> <p class="text"> - {{ ctaText }} + <span>{{ ctaText }}</span> <br /><br /> <a class="btn" href="{{ ctaLinkUrl|e('html_attr') }}" target="_blank" rel="noreferrer"> {{ ctaLinkTitle }} diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml index c064ffd441..3bf0a56ac3 100755 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getWidgetMetadata.xml @@ -3364,7 +3364,7 @@ <isWide>0</isWide> </row> <row> - <name>Premium Products & Services for Piwik</name> + <name>Premium Features & Services for Piwik</name> <category> <id>About Piwik</id> <name>About Piwik</name> diff --git a/tests/UI/expected-screenshots/DashboardManager_create_new.png b/tests/UI/expected-screenshots/DashboardManager_create_new.png index dc4b931886..c2bbc13895 100644 --- a/tests/UI/expected-screenshots/DashboardManager_create_new.png +++ b/tests/UI/expected-screenshots/DashboardManager_create_new.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04dfdef354eb3b75d7342dea0ffe8bf4ce102afbfb330bb4bcfbec547b247df7 -size 246227 +oid sha256:2e181f3560199b5417aa58da0ae328d36e881a91c6608f13529e8b724412c192 +size 249822 diff --git a/tests/UI/expected-screenshots/Dashboard_reset.png b/tests/UI/expected-screenshots/Dashboard_reset.png index aa6004a698..22398b788c 100644 --- a/tests/UI/expected-screenshots/Dashboard_reset.png +++ b/tests/UI/expected-screenshots/Dashboard_reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dcdeb3f79ef07678939ab5e86c8d18014a185e5d4d5a8c826d80926b996b6f22 -size 250219 +oid sha256:4bf10234bd54f38f757e40cc59d6ae8804baa2a1a7eeff8d38a216cade3c209a +size 254315 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png index ea7f3b4a76..390ad437df 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6364370a23fff1e66cc0bdba80d5c2084fc5ba0b69a859084dd777bc4db4b97 -size 1618835 +oid sha256:dacffaf757df84952eaf6918d1e76d3c9da7fcbbea8c5db97b2280105503eb8d +size 1622257 |