From 4cfa59637a3209958e2406fb81a616f0141c1d6e Mon Sep 17 00:00:00 2001 From: mattab Date: Sat, 25 Mar 2017 01:02:58 +0100 Subject: refactor into twig files --- .../ProfessionalServices/ProfessionalServices.php | 37 ++++++---------------- .../templates/promoBelowEvents.twig | 7 ++++ .../templates/promoExperiments.twig | 3 ++ .../templates/promoFunnel.twig | 5 +++ .../templates/promoSearchKeywords.twig | 6 ++++ 5 files changed, 31 insertions(+), 27 deletions(-) create mode 100644 plugins/ProfessionalServices/templates/promoBelowEvents.twig create mode 100644 plugins/ProfessionalServices/templates/promoExperiments.twig create mode 100644 plugins/ProfessionalServices/templates/promoFunnel.twig create mode 100644 plugins/ProfessionalServices/templates/promoSearchKeywords.twig (limited to 'plugins/ProfessionalServices') diff --git a/plugins/ProfessionalServices/ProfessionalServices.php b/plugins/ProfessionalServices/ProfessionalServices.php index 76a2350b54..5dd848e61d 100644 --- a/plugins/ProfessionalServices/ProfessionalServices.php +++ b/plugins/ProfessionalServices/ProfessionalServices.php @@ -9,6 +9,7 @@ namespace Piwik\Plugins\ProfessionalServices; use Piwik\Common; +use Piwik\View; class ProfessionalServices extends \Piwik\Plugin { @@ -66,13 +67,8 @@ class ProfessionalServices extends \Piwik\Plugin return; } - $out .= ' -

Did you know?
- Use Search Keywords Performance - 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. -

'; + $view = new View('@ProfessionalServices/promoSearchKeywords'); + $out .= $view->render(); } public function getGoalFunnelOverviewPromo(&$out) @@ -82,12 +78,8 @@ class ProfessionalServices extends \Piwik\Plugin return; } - $out .= ' -

Did you know? - A Funnel defines a series of actions that you expect your visitors to take on their way to converting a goal. -
With Funnels for Piwik, - you can easily determine your funnel and see where your visitors drop off and how to focus efforts to increase your conversions. -

'; + $view = new View('@ProfessionalServices/promoFunnel'); + $out .= $view->render(); } @@ -98,11 +90,8 @@ class ProfessionalServices extends \Piwik\Plugin return; } - $out .= ' -

Did you know? - With A/B Testing for Piwik you can immediately increase conversions and sales by creating different versions of a page to see which one grows your business. -

- '; + $view = new View('@ProfessionalServices/promoExperiments.twig'); + $out .= $view->render(); } public function getEventsPromo(&$out) @@ -110,14 +99,8 @@ class ProfessionalServices extends \Piwik\Plugin if($this->isRequestForDashboardWidget()) { return; } - $inlineAd = ''; - if(!\Piwik\Plugin\Manager::getInstance()->isPluginActivated('MediaAnalytics')) { - $inlineAd = '
When you publish videos or audios, Media Analytics gives deep insights into your audience and how they watch your videos or listens to your music.'; - } - $out .= '

Did you know? -
Using Events you can measure any user interaction and gain amazing insights into your audience. Learn more. -
To measure blocks of content such as image galleries, listings or ads: use Content Tracking and see exactly which content is viewed and clicked. - ' . $inlineAd . ' -

'; + $view = new View('@ProfessionalServices/promoBelowEvents'); + $view->displayMediaAnalyticsAd = !\Piwik\Plugin\Manager::getInstance()->isPluginActivated('MediaAnalytics'); + $out .= $view->render(); } } diff --git a/plugins/ProfessionalServices/templates/promoBelowEvents.twig b/plugins/ProfessionalServices/templates/promoBelowEvents.twig new file mode 100644 index 0000000000..8121d9c1cb --- /dev/null +++ b/plugins/ProfessionalServices/templates/promoBelowEvents.twig @@ -0,0 +1,7 @@ +

Did you know? +
Using Events you can measure any user interaction and gain amazing insights into your audience. Learn more. +
To measure blocks of content such as image galleries, listings or ads: use Content Tracking and see exactly which content is viewed and clicked. + {% if displayMediaAnalyticsAd %} +
When you publish videos or audios, Media Analytics gives deep insights into your audience and how they watch your videos or listens to your music. + {% endif %} +

\ No newline at end of file diff --git a/plugins/ProfessionalServices/templates/promoExperiments.twig b/plugins/ProfessionalServices/templates/promoExperiments.twig new file mode 100644 index 0000000000..cfef975e0c --- /dev/null +++ b/plugins/ProfessionalServices/templates/promoExperiments.twig @@ -0,0 +1,3 @@ +

Did you know? + With A/B Testing for Piwik you can immediately increase conversions and sales by creating different versions of a page to see which one grows your business. +

\ No newline at end of file diff --git a/plugins/ProfessionalServices/templates/promoFunnel.twig b/plugins/ProfessionalServices/templates/promoFunnel.twig new file mode 100644 index 0000000000..4e1118a0ef --- /dev/null +++ b/plugins/ProfessionalServices/templates/promoFunnel.twig @@ -0,0 +1,5 @@ +

Did you know? + A Funnel defines a series of actions that you expect your visitors to take on their way to converting a goal. +
With Funnels for Piwik, + you can easily determine your funnel and see where your visitors drop off and how to focus efforts to increase your conversions. +

\ No newline at end of file diff --git a/plugins/ProfessionalServices/templates/promoSearchKeywords.twig b/plugins/ProfessionalServices/templates/promoSearchKeywords.twig new file mode 100644 index 0000000000..aaa283b68f --- /dev/null +++ b/plugins/ProfessionalServices/templates/promoSearchKeywords.twig @@ -0,0 +1,6 @@ +

Did you know?
+ Use Search Keywords Performance + 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. +

\ No newline at end of file -- cgit v1.2.3