update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
36
www/analytics/plugins/Ecommerce/Columns/BaseConversion.php
Normal file
36
www/analytics/plugins/Ecommerce/Columns/BaseConversion.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Plugin\Dimension\ConversionDimension;
|
||||
use Piwik\Tracker\GoalManager;
|
||||
|
||||
abstract class BaseConversion extends ConversionDimension
|
||||
{
|
||||
/**
|
||||
* Returns rounded decimal revenue, or if revenue is integer, then returns as is.
|
||||
*
|
||||
* @param int|float $revenue
|
||||
* @return int|float
|
||||
*/
|
||||
protected function roundRevenueIfNeeded($revenue)
|
||||
{
|
||||
if (false === $revenue) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (round($revenue) == $revenue) {
|
||||
return $revenue;
|
||||
}
|
||||
|
||||
$value = round($revenue, GoalManager::REVENUE_PRECISION);
|
||||
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
20
www/analytics/plugins/Ecommerce/Columns/ProductCategory.php
Normal file
20
www/analytics/plugins/Ecommerce/Columns/ProductCategory.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Columns\Dimension;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class ProductCategory extends Dimension
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
return Piwik::translate('Goals_ProductCategory');
|
||||
}
|
||||
}
|
||||
20
www/analytics/plugins/Ecommerce/Columns/ProductName.php
Normal file
20
www/analytics/plugins/Ecommerce/Columns/ProductName.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Columns\Dimension;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class ProductName extends Dimension
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
return Piwik::translate('Goals_ProductName');
|
||||
}
|
||||
}
|
||||
20
www/analytics/plugins/Ecommerce/Columns/ProductSku.php
Normal file
20
www/analytics/plugins/Ecommerce/Columns/ProductSku.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Columns\Dimension;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class ProductSku extends Dimension
|
||||
{
|
||||
public function getName()
|
||||
{
|
||||
return Piwik::translate('Goals_ProductSKU');
|
||||
}
|
||||
}
|
||||
65
www/analytics/plugins/Ecommerce/Columns/Revenue.php
Normal file
65
www/analytics/plugins/Ecommerce/Columns/Revenue.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\Visitor;
|
||||
|
||||
class Revenue extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'revenue';
|
||||
protected $columnType = 'float default NULL';
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onGoalConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
$defaultRevenue = $goalManager->getGoalColumn('revenue');
|
||||
$revenue = $request->getGoalRevenue($defaultRevenue);
|
||||
|
||||
return $this->roundRevenueIfNeeded($revenue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
$defaultRevenue = 0;
|
||||
$revenue = $request->getGoalRevenue($defaultRevenue);
|
||||
|
||||
return $this->roundRevenueIfNeeded($revenue);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceCartUpdateConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
return $this->onEcommerceOrderConversion($request, $visitor, $action, $goalManager);
|
||||
}
|
||||
}
|
||||
33
www/analytics/plugins/Ecommerce/Columns/RevenueDiscount.php
Normal file
33
www/analytics/plugins/Ecommerce/Columns/RevenueDiscount.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\Visitor;
|
||||
|
||||
class RevenueDiscount extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'revenue_discount';
|
||||
protected $columnType = 'float default NULL';
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
return $this->roundRevenueIfNeeded($request->getParam('ec_dt'));
|
||||
}
|
||||
}
|
||||
33
www/analytics/plugins/Ecommerce/Columns/RevenueShipping.php
Normal file
33
www/analytics/plugins/Ecommerce/Columns/RevenueShipping.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\Visitor;
|
||||
|
||||
class RevenueShipping extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'revenue_shipping';
|
||||
protected $columnType = 'float default NULL';
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
return $this->roundRevenueIfNeeded($request->getParam('ec_sh'));
|
||||
}
|
||||
}
|
||||
33
www/analytics/plugins/Ecommerce/Columns/RevenueSubtotal.php
Normal file
33
www/analytics/plugins/Ecommerce/Columns/RevenueSubtotal.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\Visitor;
|
||||
|
||||
class RevenueSubtotal extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'revenue_subtotal';
|
||||
protected $columnType = 'float default NULL';
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
return $this->roundRevenueIfNeeded($request->getParam('ec_st'));
|
||||
}
|
||||
}
|
||||
33
www/analytics/plugins/Ecommerce/Columns/RevenueTax.php
Normal file
33
www/analytics/plugins/Ecommerce/Columns/RevenueTax.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?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\Ecommerce\Columns;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\Visitor;
|
||||
|
||||
class RevenueTax extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'revenue_tax';
|
||||
protected $columnType = 'float default NULL';
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Visitor $visitor
|
||||
* @param Action|null $action
|
||||
* @param GoalManager $goalManager
|
||||
*
|
||||
* @return mixed|false
|
||||
*/
|
||||
public function onEcommerceOrderConversion(Request $request, Visitor $visitor, $action, GoalManager $goalManager)
|
||||
{
|
||||
return $this->roundRevenueIfNeeded($request->getParam('ec_tx'));
|
||||
}
|
||||
}
|
||||
124
www/analytics/plugins/Ecommerce/Controller.php
Normal file
124
www/analytics/plugins/Ecommerce/Controller.php
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
<?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\Ecommerce;
|
||||
|
||||
use Exception;
|
||||
use Piwik\DataTable;
|
||||
use Piwik\FrontController;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Translation\Translator;
|
||||
use Piwik\View;
|
||||
use Piwik\Plugins\Goals\TranslationHelper;
|
||||
|
||||
class Controller extends \Piwik\Plugins\Goals\Controller
|
||||
{
|
||||
/**
|
||||
* @var Translator
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
public function __construct(Translator $translator, TranslationHelper $translationHelper)
|
||||
{
|
||||
$this->translator = $translator;
|
||||
|
||||
parent::__construct($translator, $translationHelper);
|
||||
}
|
||||
|
||||
public function ecommerceReport()
|
||||
{
|
||||
if (!\Piwik\Plugin\Manager::getInstance()->isPluginActivated('CustomVariables')) {
|
||||
throw new Exception("Ecommerce Tracking requires that the plugin Custom Variables is enabled. Please enable the plugin CustomVariables (or ask your admin).");
|
||||
}
|
||||
|
||||
$view = $this->getGoalReportView($idGoal = Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
$view->displayFullReport = false;
|
||||
$view->headline = $this->translator->translate('General_EvolutionOverPeriod');
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function ecommerceLogReport($fetch = false)
|
||||
{
|
||||
$view = new View('@Ecommerce/ecommerceLog');
|
||||
$this->setGeneralVariablesView($view);
|
||||
|
||||
$view->ecommerceLog = $this->getEcommerceLog($fetch);
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function getEcommerceLog($fetch = false)
|
||||
{
|
||||
$saveGET = $_GET;
|
||||
$_GET['segment'] = urlencode('visitEcommerceStatus!=none');
|
||||
$_GET['widget'] = 1;
|
||||
$output = FrontController::getInstance()->dispatch('Live', 'getVisitorLog', array($fetch));
|
||||
$_GET = $saveGET;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return $this->ecommerceReport();
|
||||
}
|
||||
|
||||
public function products()
|
||||
{
|
||||
$goal = $this->getMetricsForGoal(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
$conversions = 0;
|
||||
if (!empty($goal['nb_conversions'])) {
|
||||
$conversions = $goal['nb_conversions'];
|
||||
}
|
||||
|
||||
$goal = $this->getMetricsForGoal(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART);
|
||||
|
||||
$cartNbConversions = 0;
|
||||
if (!empty($goal) && array_key_exists('nb_conversions', $goal)) {
|
||||
$cartNbConversions = $goal['nb_conversions'];
|
||||
}
|
||||
|
||||
$preloadAbandonedCart = $cartNbConversions !== false && $conversions == 0;
|
||||
|
||||
$goalReportsByDimension = new View\ReportsByDimension('Goals');
|
||||
|
||||
$ecommerceCustomParams = array();
|
||||
if ($preloadAbandonedCart) {
|
||||
$ecommerceCustomParams['abandonedCarts'] = '1';
|
||||
} else {
|
||||
$ecommerceCustomParams['abandonedCarts'] = '0';
|
||||
}
|
||||
|
||||
$goalReportsByDimension->addReport(
|
||||
'Goals_Products', 'Goals_ProductSKU', 'Goals.getItemsSku', $ecommerceCustomParams);
|
||||
$goalReportsByDimension->addReport(
|
||||
'Goals_Products', 'Goals_ProductName', 'Goals.getItemsName', $ecommerceCustomParams);
|
||||
$goalReportsByDimension->addReport(
|
||||
'Goals_Products', 'Goals_ProductCategory', 'Goals.getItemsCategory', $ecommerceCustomParams);
|
||||
|
||||
$view = new View('@Ecommerce/products');
|
||||
$this->setGeneralVariablesView($view);
|
||||
|
||||
$view->productsByDimension = $goalReportsByDimension->render();
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function sales()
|
||||
{
|
||||
$viewOverview = $this->getGoalReportView(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
$reportsByDimension = $viewOverview->goalReportsByDimension;
|
||||
|
||||
$view = new View('@Ecommerce/sales');
|
||||
$this->setGeneralVariablesView($view);
|
||||
|
||||
$view->goalReportsByDimension = $reportsByDimension;
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
}
|
||||
39
www/analytics/plugins/Ecommerce/Menu.php
Normal file
39
www/analytics/plugins/Ecommerce/Menu.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?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\Ecommerce;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Menu\MenuReporting;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Site;
|
||||
use Piwik\Url;
|
||||
|
||||
/**
|
||||
*/
|
||||
class Menu extends \Piwik\Plugin\Menu
|
||||
{
|
||||
|
||||
public function configureReportingMenu(MenuReporting $menu)
|
||||
{
|
||||
$idSite = Common::getRequestVar('idSite', null, 'int');
|
||||
|
||||
$site = new Site($idSite);
|
||||
|
||||
if ($site->isEcommerceEnabled()) {
|
||||
$ecommerceParams = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
|
||||
$menu->addItem('Goals_Ecommerce', '', array(), 24);
|
||||
$menu->addItem('Goals_Ecommerce', 'General_Overview', $this->urlForAction('ecommerceReport', $ecommerceParams), 1);
|
||||
$menu->addItem('Goals_Ecommerce', 'Goals_EcommerceLog', $this->urlForAction('ecommerceLogReport'), 2);
|
||||
$menu->addItem('Goals_Ecommerce', 'Goals_Products', $this->urlForAction('products', $ecommerceParams), 3);
|
||||
$menu->addItem('Goals_Ecommerce', 'Ecommerce_Sales', $this->urlForAction('sales', $ecommerceParams), 4);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
75
www/analytics/plugins/Ecommerce/Reports/Base.php
Normal file
75
www/analytics/plugins/Ecommerce/Reports/Base.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Report;
|
||||
use Piwik\Site;
|
||||
|
||||
abstract class Base extends Report
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
$this->module = 'Goals';
|
||||
$this->category = 'Goals_Ecommerce';
|
||||
}
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
$idSite = Common::getRequestVar('idSite', false, 'int');
|
||||
|
||||
if (empty($idSite)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->isEcommerceEnabled($idSite);
|
||||
}
|
||||
|
||||
public function checkIsEnabled()
|
||||
{
|
||||
if (!$this->isEnabled()) {
|
||||
$message = Piwik::translate('General_ExceptionReportNotEnabled');
|
||||
|
||||
if (Piwik::hasUserSuperUserAccess()) {
|
||||
$message .= ' Most likely Ecommerce is not enabled for the requested site.';
|
||||
}
|
||||
|
||||
throw new \Exception($message);
|
||||
}
|
||||
}
|
||||
|
||||
public function configureReportMetadata(&$availableReports, $infos)
|
||||
{
|
||||
if ($this->isEcommerceEnabledByInfos($infos)) {
|
||||
$availableReports[] = $this->buildReportMetadata();
|
||||
}
|
||||
}
|
||||
|
||||
private function isEcommerceEnabledByInfos($infos)
|
||||
{
|
||||
$idSites = $infos['idSites'];
|
||||
|
||||
if (count($idSites) != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$idSite = reset($idSites);
|
||||
|
||||
return $this->isEcommerceEnabled($idSite);
|
||||
}
|
||||
|
||||
private function isEcommerceEnabled($idSite)
|
||||
{
|
||||
$site = new Site($idSite);
|
||||
|
||||
return $site->isEcommerceEnabled();
|
||||
}
|
||||
|
||||
}
|
||||
134
www/analytics/plugins/Ecommerce/Reports/BaseItem.php
Normal file
134
www/analytics/plugins/Ecommerce/Reports/BaseItem.php
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Metrics\Formatter;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\Report;
|
||||
use Piwik\Plugin\ViewDataTable;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution;
|
||||
use Piwik\Plugins\Goals\Goals;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\AveragePrice;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\AverageQuantity;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\ProductConversionRate;
|
||||
|
||||
abstract class BaseItem extends Base
|
||||
{
|
||||
protected $defaultSortColumn = 'revenue';
|
||||
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->processedMetrics = array(
|
||||
new AveragePrice(),
|
||||
new AverageQuantity(),
|
||||
new ProductConversionRate()
|
||||
);
|
||||
$this->metrics = array(
|
||||
'revenue', 'quantity', 'orders', 'nb_visits'
|
||||
);
|
||||
}
|
||||
|
||||
public function getMetrics()
|
||||
{
|
||||
$metrics = parent::getMetrics();
|
||||
$metrics['revenue'] = Piwik::translate('General_ProductRevenue');
|
||||
$metrics['orders'] = Piwik::translate('General_UniquePurchases');
|
||||
return $metrics;
|
||||
}
|
||||
|
||||
public function getMetricsDocumentation()
|
||||
{
|
||||
if ($this->isAbandonedCart()) {
|
||||
return array(
|
||||
'revenue' => Piwik::translate('Goals_ColumnRevenueDocumentation',
|
||||
Piwik::translate('Goals_DocumentationRevenueGeneratedByProductSales')),
|
||||
'quantity' => Piwik::translate('Goals_ColumnQuantityDocumentation', $this->name),
|
||||
'orders' => Piwik::translate('Goals_ColumnOrdersDocumentation', $this->name),
|
||||
'avg_price' => Piwik::translate('Goals_ColumnAveragePriceDocumentation', $this->name),
|
||||
'avg_quantity' => Piwik::translate('Goals_ColumnAverageQuantityDocumentation', $this->name),
|
||||
'nb_visits' => Piwik::translate('Goals_ColumnVisitsProductDocumentation', $this->name),
|
||||
'conversion_rate' => Piwik::translate('Goals_ColumnConversionRateProductDocumentation', $this->name),
|
||||
);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
public function configureView(ViewDataTable $view)
|
||||
{
|
||||
$idSite = Common::getRequestVar('idSite');
|
||||
|
||||
$view->config->show_ecommerce = true;
|
||||
$view->config->show_table = false;
|
||||
$view->config->show_all_views_icons = false;
|
||||
$view->config->show_exclude_low_population = false;
|
||||
$view->config->show_table_all_columns = false;
|
||||
|
||||
if (!($view instanceof Evolution)) {
|
||||
$moneyColumns = array('revenue');
|
||||
$formatter = array(new Formatter(), 'getPrettyMoney');
|
||||
$view->config->filters[] = array('ColumnCallbackReplace', array($moneyColumns, $formatter, array($idSite)));
|
||||
}
|
||||
|
||||
$view->requestConfig->filter_limit = 10;
|
||||
$view->requestConfig->filter_sort_column = 'revenue';
|
||||
$view->requestConfig->filter_sort_order = 'desc';
|
||||
|
||||
$view->config->custom_parameters['isFooterExpandedInDashboard'] = true;
|
||||
|
||||
// set columns/translations which differ based on viewDataTable TODO: shouldn't have to do this check...
|
||||
// amount of reports should be dynamic, but metadata should be static
|
||||
$columns = array_merge($this->getMetrics(), $this->getProcessedMetrics());
|
||||
$columnsOrdered = array('label', 'revenue', 'quantity', 'orders', 'avg_price', 'avg_quantity',
|
||||
'nb_visits', 'conversion_rate');
|
||||
|
||||
// handle old case where viewDataTable is set to ecommerceOrder/ecommerceAbandonedCart. in this case, we
|
||||
// set abandonedCarts accordingly and remove the ecommerceOrder/ecommerceAbandonedCart as viewDataTable.
|
||||
$viewDataTable = Common::getRequestVar('viewDataTable', '');
|
||||
if ($viewDataTable == 'ecommerceOrder') {
|
||||
$view->config->custom_parameters['viewDataTable'] = 'table';
|
||||
$abandonedCart = false;
|
||||
} else if ($viewDataTable == 'ecommerceAbandonedCart') {
|
||||
$view->config->custom_parameters['viewDataTable'] = 'table';
|
||||
$abandonedCart = true;
|
||||
} else {
|
||||
$abandonedCart = $this->isAbandonedCart();
|
||||
}
|
||||
|
||||
if ($abandonedCart) {
|
||||
$columns['abandoned_carts'] = Piwik::translate('General_AbandonedCarts');
|
||||
$columns['revenue'] = Piwik::translate('Goals_LeftInCart', $columns['revenue']);
|
||||
$columns['quantity'] = Piwik::translate('Goals_LeftInCart', $columns['quantity']);
|
||||
$columns['avg_quantity'] = Piwik::translate('Goals_LeftInCart', $columns['avg_quantity']);
|
||||
unset($columns['orders']);
|
||||
unset($columns['conversion_rate']);
|
||||
|
||||
$columnsOrdered = array('label', 'revenue', 'quantity', 'avg_price', 'avg_quantity', 'nb_visits',
|
||||
'abandoned_carts');
|
||||
|
||||
$view->config->custom_parameters['abandonedCarts'] = '1';
|
||||
} else {
|
||||
$view->config->custom_parameters['abandonedCarts'] = '0';
|
||||
}
|
||||
|
||||
$view->requestConfig->request_parameters_to_modify['abandonedCarts'] = $view->config->custom_parameters['abandonedCarts'];
|
||||
|
||||
$translations = array_merge(array('label' => $this->name), $columns);
|
||||
|
||||
$view->config->addTranslations($translations);
|
||||
$view->config->columns_to_display = $columnsOrdered;
|
||||
}
|
||||
|
||||
private function isAbandonedCart()
|
||||
{
|
||||
return Common::getRequestVar('abandonedCarts', '0', 'string') == 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Goals\Columns\DaysToConversion;
|
||||
|
||||
class GetDaysToConversionAbandonedCart extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->action = 'getDaysToConversion';
|
||||
$this->name = Piwik::translate('General_AbandonedCarts') . ' - ' . Piwik::translate('Goals_DaysToConv');
|
||||
$this->dimension = new DaysToConversion();
|
||||
$this->constantRowsCount = true;
|
||||
$this->processedMetrics = false;
|
||||
$this->metrics = array('nb_conversions');
|
||||
$this->order = 25;
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Goals\Columns\DaysToConversion;
|
||||
|
||||
class GetDaysToConversionEcommerceOrder extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->action = 'getDaysToConversion';
|
||||
$this->name = Piwik::translate('General_EcommerceOrders') . ' - ' . Piwik::translate('Goals_DaysToConv');
|
||||
$this->dimension = new DaysToConversion();
|
||||
$this->constantRowsCount = true;
|
||||
$this->processedMetrics = false;
|
||||
$this->metrics = array('nb_conversions');
|
||||
$this->order = 12;
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
|
||||
class GetEcommerceAbandonedCart extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->action = 'get';
|
||||
$this->name = Piwik::translate('General_AbandonedCarts');
|
||||
$this->processedMetrics = array('avg_order_revenue');
|
||||
$this->order = 15;
|
||||
$this->metrics = array('nb_conversions', 'conversion_rate', 'revenue', 'items');
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART);
|
||||
}
|
||||
|
||||
public function getMetrics() {
|
||||
$metrics = parent::getMetrics();
|
||||
|
||||
$metrics['nb_conversions'] = Piwik::translate('General_AbandonedCarts');
|
||||
$metrics['revenue'] = Piwik::translate('Goals_LeftInCart', Piwik::translate('General_ColumnRevenue'));
|
||||
$metrics['items'] = Piwik::translate('Goals_LeftInCart', Piwik::translate('Goals_Products'));
|
||||
|
||||
return $metrics;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
|
||||
class GetEcommerceOrder extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->action = 'get';
|
||||
$this->name = Piwik::translate('General_EcommerceOrders');
|
||||
$this->processedMetrics = array('avg_order_revenue');
|
||||
$this->order = 10;
|
||||
$this->metrics = array(
|
||||
'nb_conversions',
|
||||
'nb_visits_converted',
|
||||
'conversion_rate',
|
||||
'revenue',
|
||||
'revenue_subtotal',
|
||||
'revenue_tax',
|
||||
'revenue_shipping',
|
||||
'revenue_discount'
|
||||
);
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
}
|
||||
|
||||
public function getMetrics()
|
||||
{
|
||||
$metrics = parent::getMetrics();
|
||||
|
||||
$metrics['nb_conversions'] = Piwik::translate('General_EcommerceOrders');
|
||||
$metrics['items'] = Piwik::translate('General_PurchasedProducts');
|
||||
|
||||
return $metrics;
|
||||
}
|
||||
}
|
||||
25
www/analytics/plugins/Ecommerce/Reports/GetItemsCategory.php
Normal file
25
www/analytics/plugins/Ecommerce/Reports/GetItemsCategory.php
Normal 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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Ecommerce\Columns\ProductCategory;
|
||||
|
||||
class GetItemsCategory extends BaseItem
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->name = Piwik::translate('Goals_ProductCategory');
|
||||
$this->dimension = new ProductCategory();
|
||||
$this->order = 32;
|
||||
$this->widgetTitle = 'Goals_ProductCategory';
|
||||
}
|
||||
}
|
||||
25
www/analytics/plugins/Ecommerce/Reports/GetItemsName.php
Normal file
25
www/analytics/plugins/Ecommerce/Reports/GetItemsName.php
Normal 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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Ecommerce\Columns\ProductName;
|
||||
|
||||
class GetItemsName extends BaseItem
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->name = Piwik::translate('Goals_ProductName');
|
||||
$this->dimension = new ProductName();
|
||||
$this->order = 31;
|
||||
$this->widgetTitle = 'Goals_ProductName';
|
||||
}
|
||||
}
|
||||
27
www/analytics/plugins/Ecommerce/Reports/GetItemsSku.php
Normal file
27
www/analytics/plugins/Ecommerce/Reports/GetItemsSku.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Ecommerce\Columns\ProductSku;
|
||||
|
||||
class GetItemsSku extends BaseItem
|
||||
{
|
||||
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->name = Piwik::translate('Goals_ProductSKU');
|
||||
$this->dimension = new ProductSku();
|
||||
$this->order = 30;
|
||||
$this->widgetTitle = 'Goals_ProductSKU';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Goals\Columns\VisitsUntilConversion;
|
||||
|
||||
class GetVisitsUntilConversionAbandonedCart extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->action = 'getVisitsUntilConversion';
|
||||
$this->name = Piwik::translate('General_AbandonedCarts') . ' - ' . Piwik::translate('Goals_VisitsUntilConv');
|
||||
$this->dimension = new VisitsUntilConversion();
|
||||
$this->constantRowsCount = true;
|
||||
$this->processedMetrics = false;
|
||||
$this->metrics = array('nb_conversions');
|
||||
$this->order = 20;
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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\Ecommerce\Reports;
|
||||
|
||||
use Piwik\Metrics;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Goals\Columns\VisitsUntilConversion;
|
||||
|
||||
class GetVisitsUntilConversionEcommerceOrder extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
$this->action = 'getVisitsUntilConversion';
|
||||
$this->name = Piwik::translate('General_EcommerceOrders') . ' - ' . Piwik::translate('Goals_VisitsUntilConv');
|
||||
$this->dimension = new VisitsUntilConversion();
|
||||
$this->constantRowsCount = true;
|
||||
$this->processedMetrics = array();
|
||||
$this->metrics = array('nb_conversions');
|
||||
$this->order = 11;
|
||||
|
||||
$this->parameters = array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?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\Ecommerce\Tracker;
|
||||
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\Request;
|
||||
use Piwik\Tracker\RequestProcessor;
|
||||
use Piwik\Tracker\Visit\VisitProperties;
|
||||
|
||||
/**
|
||||
* Handles ecommerce tracking requests.
|
||||
*
|
||||
* ## Request Metadata
|
||||
*
|
||||
* This processor defines the following request metadata under the **Ecommerce**
|
||||
* plugin:
|
||||
*
|
||||
* * **isRequestEcommerce**: If `true`, the request is for an ecommerce goal conversion.
|
||||
*
|
||||
* Set in `processRequestParams()`.
|
||||
*
|
||||
* * **isGoalAnOrder**: If `true` the request is tracking an ecommerce order.
|
||||
*
|
||||
* Set in `processRequestParams()`.
|
||||
*/
|
||||
class EcommerceRequestProcessor extends RequestProcessor
|
||||
{
|
||||
/**
|
||||
* @var GoalManager
|
||||
*/
|
||||
public $goalManager = null;
|
||||
|
||||
public function __construct(GoalManager $goalManager)
|
||||
{
|
||||
$this->goalManager = $goalManager;
|
||||
}
|
||||
|
||||
public function processRequestParams(VisitProperties $visitProperties, Request $request)
|
||||
{
|
||||
$isGoalAnOrder = $this->isRequestForAnOrder($request);
|
||||
$request->setMetadata('Ecommerce', 'isGoalAnOrder', $isGoalAnOrder);
|
||||
|
||||
$isRequestEcommerce = $this->isRequestEcommerce($request);
|
||||
$request->setMetadata('Ecommerce', 'isRequestEcommerce', $isRequestEcommerce);
|
||||
|
||||
if ($isRequestEcommerce) {
|
||||
// Mark the visit as Converted only if it is an order (not for a Cart update)
|
||||
$idGoal = GoalManager::IDGOAL_CART;
|
||||
if ($isGoalAnOrder) {
|
||||
$idGoal = GoalManager::IDGOAL_ORDER;
|
||||
$request->setMetadata('Goals', 'visitIsConverted', true);
|
||||
}
|
||||
|
||||
$request->setMetadata('Goals', 'goalsConverted', array(array('idgoal' => $idGoal)));
|
||||
|
||||
$request->setMetadata('Actions', 'action', null); // don't track actions when tracking ecommerce orders
|
||||
}
|
||||
}
|
||||
|
||||
public function afterRequestProcessed(VisitProperties $visitProperties, Request $request)
|
||||
{
|
||||
$goalsConverted = $request->getMetadata('Goals', 'goalsConverted');
|
||||
if (!empty($goalsConverted)) {
|
||||
$isThereExistingCartInVisit = $this->goalManager->detectIsThereExistingCartInVisit(
|
||||
$visitProperties->getProperties());
|
||||
$request->setMetadata('Goals', 'isThereExistingCartInVisit', $isThereExistingCartInVisit);
|
||||
}
|
||||
}
|
||||
|
||||
private function isRequestForAnOrder(Request $request)
|
||||
{
|
||||
$orderId = $request->getParam('ec_id');
|
||||
return !empty($orderId);
|
||||
}
|
||||
|
||||
private function isRequestEcommerce(Request $request)
|
||||
{
|
||||
$idGoal = $request->getParam('idgoal');
|
||||
return 0 == $idGoal;
|
||||
}
|
||||
}
|
||||
35
www/analytics/plugins/Ecommerce/Widgets.php
Normal file
35
www/analytics/plugins/Ecommerce/Widgets.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?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\Ecommerce;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Site;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class Widgets extends \Piwik\Plugin\Widgets
|
||||
{
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
|
||||
protected function init()
|
||||
{
|
||||
$idSite = $this->getIdSite();
|
||||
|
||||
$site = new Site($idSite);
|
||||
if ($site->isEcommerceEnabled()) {
|
||||
$this->addWidget('General_Overview', 'widgetGoalReport', array('idGoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER));
|
||||
$this->addWidget('Goals_EcommerceLog', 'getEcommerceLog');
|
||||
}
|
||||
}
|
||||
|
||||
private function getIdSite()
|
||||
{
|
||||
return Common::getRequestVar('idSite', null, 'int');
|
||||
}
|
||||
|
||||
}
|
||||
5
www/analytics/plugins/Ecommerce/lang/bg.json
Normal file
5
www/analytics/plugins/Ecommerce/lang/bg.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Продажби"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/cs.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/cs.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce vám umožňuje sledovat, kdy uživatelé přidají produkt do košíku a kdy dojde ke konverzi na objednávku. Také umožňuje sledovat zobrazení stránek produktů, kategorií a opuštěné košíky.",
|
||||
"Sales": "Tržby",
|
||||
"SalesBy": "Tržby podle %s",
|
||||
"SalesAdjective": "Tržby %s"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Ecommerce/lang/da.json
Normal file
5
www/analytics/plugins/Ecommerce/lang/da.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Salg"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/de.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/de.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Mit Ecommerce haben Sie die Möglichkeit zu Erfassen wenn ein Besucher Produkte in den Warenkorb legt, und wann es zu einem Verkauf kommt. Zusätzlich lassen sich auch Besuche von Produkt- sowie Kategorieseiten und verlassene Warenkörbe erfassen.",
|
||||
"Sales": "Umsatz",
|
||||
"SalesBy": "Umsatz nach %s",
|
||||
"SalesAdjective": "Umsatz %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/el.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/el.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Το Ecommerce σας επιτρέπει να παρακολουθείτε τους χρήστες όταν προσθέτουν προϊόντα στο καλάθι αγορών και όταν γίνεται μετατροπή σε πώληση ηλ. εμπορίου. Παράλληλα να παρακολουθούνται προϊόντα και επισκέψειες κατηγοριών προϊόντων και καλάθια που δεν έγιναν αγορές.",
|
||||
"Sales": "Πωλήσεις",
|
||||
"SalesBy": "Πωλήσεις ανά %s",
|
||||
"SalesAdjective": "Πωλήσεις %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/en.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/en.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce lets you track when users add products to carts, and when they convert to a ecommerce sale. Also track products and product categories views and abandoned carts.",
|
||||
"Sales": "Sales",
|
||||
"SalesBy": "Sales by %s",
|
||||
"SalesAdjective": "Sales %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/es.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/es.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Comercio electrónico le permite rastrear cuando los usuarios agregan productos a su carrito y cuando se transforman en una venta electrónica. También rastrea productos y visualiza las categorías de producto y sus carritos abandonados.",
|
||||
"Sales": "Ventas",
|
||||
"SalesBy": "Ventas por %s",
|
||||
"SalesAdjective": "Ventas %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/fr.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/fr.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce vous permet de suivre lorsque les utilisateurs ajoutent des produits aux paniers, et quand ils se convertissent en vente de commerce électronique. Il suit également des produits, des catégories de produits vues et les paniers abandonnés.",
|
||||
"Sales": "Ventes",
|
||||
"SalesBy": "Ventes par %s",
|
||||
"SalesAdjective": "Ventes %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/hi.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/hi.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "वे एक ई-कॉमर्स बिक्री कन्वर्ट करने के लिए जब ई-कॉमर्स उपयोगकर्ताओं गाड़ियां करने के लिए उत्पादों को जोड़ने जब आप ट्रैक कर सकते हैं, और। इसके अलावा उत्पादों और उत्पाद श्रेणियों के विचार को त्याग दिया और गाड़ियां ट्रैक।",
|
||||
"Sales": "बिक्री",
|
||||
"SalesBy": "%s द्वारा बिक्री",
|
||||
"SalesAdjective": "बिक्री %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/it.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/it.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce ti consente di tracciare quando gli utenti aggiungono al carrello dei prodotti, e quando questi vengono convertiti in una vendita. Traccia anche le visioni dei prodotti, delle categorie di prodotti e i carrelli abbandonati.",
|
||||
"Sales": "Vendite",
|
||||
"SalesBy": "Vendite per %s",
|
||||
"SalesAdjective": "Vendite %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/ja.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/ja.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E コマースでは、いつユーザーがカートに製品を追加し、いつ E コマース販売に結びついたか、を追跡できます。製品、製品のカテゴリビュー、および放棄されたカートも追跡できます。",
|
||||
"Sales": "売り上げ",
|
||||
"SalesBy": "%s 別売り上げ高",
|
||||
"SalesAdjective": "売り上げ %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/nb.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/nb.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-handel lar deg spore nåt brukere legger til produkter til handlevogner og når de konverterer til et e-salg. Spor også visninger av produkter og produktkategorier, i tillegg til forlatte handlevogner.",
|
||||
"Sales": "Salg",
|
||||
"SalesBy": "Salg etter %s",
|
||||
"SalesAdjective": "Salg %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/nl.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/nl.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce laat je toe gebruikers te volgen wanneer ze producten toevoegen aan winkelmandjes, en wanneer ze omgezet worden naar een ecommerce verkoop. Houdt ook de product weergave, product categorie weergave en achtergelaten winkelmandjes bij.",
|
||||
"Sales": "Verkopen",
|
||||
"SalesBy": "Verkopen volgens %s",
|
||||
"SalesAdjective": "Verkoop %s"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/pt-br.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/pt-br.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Comércio Eletrônico permite que você controle quando os usuários adicionam produtos nos carrinhos, e quando eles convertem em uma venda de comércio eletrônico. Controla também os produtos e categorias de produtos, visualizações e carrinhos abandonados.",
|
||||
"Sales": "Vendas",
|
||||
"SalesBy": "Vendas por %s",
|
||||
"SalesAdjective": "Vendas %s"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Ecommerce/lang/pt.json
Normal file
5
www/analytics/plugins/Ecommerce/lang/pt.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Vender"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Ecommerce/lang/ru.json
Normal file
5
www/analytics/plugins/Ecommerce/lang/ru.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Продажи"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Ecommerce/lang/sk.json
Normal file
5
www/analytics/plugins/Ecommerce/lang/sk.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Predaje"
|
||||
}
|
||||
}
|
||||
8
www/analytics/plugins/Ecommerce/lang/sr.json
Normal file
8
www/analytics/plugins/Ecommerce/lang/sr.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Pomoću E-commerce možete da pratite kada posetilac dodaje proizvode u korpu i kada se obavi kupovina. Proizvode i kategorije proizvoda možete da pratite i u napuštenim korpama.",
|
||||
"Sales": "Prodaja",
|
||||
"SalesBy": "Prodaja po %s",
|
||||
"SalesAdjective": "Prodaja %s"
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Ecommerce/lang/sv.json
Normal file
7
www/analytics/plugins/Ecommerce/lang/sv.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Försäljning",
|
||||
"SalesBy": "Försäljning genom %s",
|
||||
"SalesAdjective": "Försäljning %s"
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Ecommerce/lang/ta.json
Normal file
7
www/analytics/plugins/Ecommerce/lang/ta.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "விற்பனை",
|
||||
"SalesBy": "விற்பனை %s விழுக்காட்டில்",
|
||||
"SalesAdjective": "விற்பனை %s விழுக்காடு"
|
||||
}
|
||||
}
|
||||
3
www/analytics/plugins/Ecommerce/plugin.json
Normal file
3
www/analytics/plugins/Ecommerce/plugin.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"name": "Ecommerce"
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<h2 piwik-enriched-headline>{{ 'Goals_EcommerceLog'|translate }}</h2>
|
||||
|
||||
{{ ecommerceLog|raw }}
|
||||
3
www/analytics/plugins/Ecommerce/templates/products.twig
Normal file
3
www/analytics/plugins/Ecommerce/templates/products.twig
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<h2 piwik-enriched-headline>{{ 'Goals_Products'|translate }}</h2>
|
||||
|
||||
{{ productsByDimension|raw }}
|
||||
3
www/analytics/plugins/Ecommerce/templates/sales.twig
Normal file
3
www/analytics/plugins/Ecommerce/templates/sales.twig
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<h2 piwik-enriched-headline>{{ 'Ecommerce_Sales'|translate }}</h2>
|
||||
|
||||
{{ goalReportsByDimension|raw }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue