PDF rausgenommen
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
<?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\Categories;
|
||||
|
||||
use Piwik\Category\Category;
|
||||
|
||||
class EcommerceCategory extends Category
|
||||
{
|
||||
protected $id = 'Goals_Ecommerce';
|
||||
protected $order = 20;
|
||||
protected $icon = 'icon-reporting-ecommerce';
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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\Categories;
|
||||
|
||||
use Piwik\Category\Subcategory;
|
||||
|
||||
class EcommerceLogSubcategory extends Subcategory
|
||||
{
|
||||
protected $categoryId = 'Goals_Ecommerce';
|
||||
protected $id = 'Goals_EcommerceLog';
|
||||
protected $order = 5;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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\Categories;
|
||||
|
||||
use Piwik\Category\Subcategory;
|
||||
|
||||
class EcommerceOverviewSubcategory extends Subcategory
|
||||
{
|
||||
protected $categoryId = 'Goals_Ecommerce';
|
||||
protected $id = 'General_Overview';
|
||||
protected $order = 2;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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\Categories;
|
||||
|
||||
use Piwik\Category\Subcategory;
|
||||
|
||||
class ProductSubcategory extends Subcategory
|
||||
{
|
||||
protected $categoryId = 'Goals_Ecommerce';
|
||||
protected $id = 'Goals_Products';
|
||||
protected $order = 10;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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\Categories;
|
||||
|
||||
use Piwik\Category\Subcategory;
|
||||
|
||||
class SalesSubcategory extends Subcategory
|
||||
{
|
||||
protected $categoryId = 'Goals_Ecommerce';
|
||||
protected $id = 'Ecommerce_Sales';
|
||||
protected $order = 15;
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
18
msd2/tracking/piwik/plugins/Ecommerce/Columns/Items.php
Normal file
18
msd2/tracking/piwik/plugins/Ecommerce/Columns/Items.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?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;
|
||||
|
||||
class Items extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'items';
|
||||
protected $type = self::TYPE_NUMBER;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'Ecommerce_NumberOfItems';
|
||||
|
||||
}
|
37
msd2/tracking/piwik/plugins/Ecommerce/Columns/Order.php
Normal file
37
msd2/tracking/piwik/plugins/Ecommerce/Columns/Order.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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\DimensionMetricFactory;
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\MetricsList;
|
||||
use Piwik\Plugin\ArchivedMetric;
|
||||
use Piwik\Tracker\GoalManager;
|
||||
|
||||
class Order extends BaseConversion
|
||||
{
|
||||
protected $columnName = 'idorder';
|
||||
protected $type = self::TYPE_NUMBER;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'Ecommerce_Order';
|
||||
protected $namePlural = 'Ecommerce_Orders';
|
||||
protected $metricId = 'orders';
|
||||
|
||||
public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory)
|
||||
{
|
||||
$metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_UNIQUE);
|
||||
$metricsList->addMetric($metric);
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator($this->dbTableName, 'idgoal', GoalManager::IDGOAL_ORDER);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?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
|
||||
{
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'Goals_ProductCategory';
|
||||
}
|
@ -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\Columns;
|
||||
|
||||
use Piwik\Columns\Dimension;
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Tracker\Action;
|
||||
|
||||
class ProductName extends Dimension
|
||||
{
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $dbTableName = 'log_conversion_item';
|
||||
protected $columnName = 'idaction_name';
|
||||
protected $nameSingular = 'Goals_ProductName';
|
||||
protected $namePlural = 'Goals_ProductNames';
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', Action::TYPE_ECOMMERCE_ITEM_NAME);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
|
||||
class ProductPrice extends Dimension
|
||||
{
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $dbTableName = 'log_conversion_item';
|
||||
protected $columnName = 'price';
|
||||
protected $nameSingular = 'Goals_ProductPrice';
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
|
||||
class ProductQuantity extends Dimension
|
||||
{
|
||||
protected $type = self::TYPE_NUMBER;
|
||||
protected $dbTableName = 'log_conversion_item';
|
||||
protected $columnName = 'quantity';
|
||||
protected $nameSingular = 'Goals_ProductQuantity';
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
|
||||
}
|
35
msd2/tracking/piwik/plugins/Ecommerce/Columns/ProductSku.php
Normal file
35
msd2/tracking/piwik/plugins/Ecommerce/Columns/ProductSku.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\Columns;
|
||||
|
||||
use Piwik\Columns\Dimension;
|
||||
use Piwik\Columns\Discriminator;
|
||||
use Piwik\Columns\Join\ActionNameJoin;
|
||||
use Piwik\Tracker\Action;
|
||||
|
||||
class ProductSku extends Dimension
|
||||
{
|
||||
protected $type = self::TYPE_TEXT;
|
||||
protected $dbTableName = 'log_conversion_item';
|
||||
protected $columnName = 'idaction_sku';
|
||||
protected $nameSingular = 'Goals_ProductSKU';
|
||||
protected $namePlural = 'Goals_ProductSKUs';
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
|
||||
public function getDbColumnJoin()
|
||||
{
|
||||
return new ActionNameJoin();
|
||||
}
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator('log_action', 'type', Action::TYPE_ECOMMERCE_ITEM_SKU);
|
||||
}
|
||||
|
||||
}
|
74
msd2/tracking/piwik/plugins/Ecommerce/Columns/Revenue.php
Normal file
74
msd2/tracking/piwik/plugins/Ecommerce/Columns/Revenue.php
Normal file
@ -0,0 +1,74 @@
|
||||
<?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\Discriminator;
|
||||
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';
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'Ecommerce_OrderValue';
|
||||
|
||||
public function getDbDiscriminator()
|
||||
{
|
||||
return new Discriminator($this->dbTableName, 'idgoal', GoalManager::IDGOAL_ORDER);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
}
|
@ -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\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';
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'General_Discount';
|
||||
|
||||
/**
|
||||
* @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'));
|
||||
}
|
||||
}
|
@ -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\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';
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'General_Shipping';
|
||||
|
||||
/**
|
||||
* @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'));
|
||||
}
|
||||
}
|
@ -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\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';
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'General_Subtotal';
|
||||
|
||||
/**
|
||||
* @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'));
|
||||
}
|
||||
}
|
36
msd2/tracking/piwik/plugins/Ecommerce/Columns/RevenueTax.php
Normal file
36
msd2/tracking/piwik/plugins/Ecommerce/Columns/RevenueTax.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\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';
|
||||
protected $type = self::TYPE_MONEY;
|
||||
protected $category = 'Goals_Ecommerce';
|
||||
protected $nameSingular = 'General_Tax';
|
||||
|
||||
/**
|
||||
* @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'));
|
||||
}
|
||||
}
|
128
msd2/tracking/piwik/plugins/Ecommerce/Controller.php
Normal file
128
msd2/tracking/piwik/plugins/Ecommerce/Controller.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?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\API\Request;
|
||||
use Piwik\Common;
|
||||
use Piwik\FrontController;
|
||||
use Piwik\Http;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Goals\API as GoalsApi;
|
||||
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 getSparklines()
|
||||
{
|
||||
$idGoal = Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER;
|
||||
|
||||
$view = new View('@Ecommerce/getSparklines');
|
||||
$view->onlyConversionOverview = false;
|
||||
$view->conversionsOverViewEnabled = true;
|
||||
|
||||
if ($idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER) {
|
||||
$goalDefinition['name'] = $this->translator->translate('Goals_Ecommerce');
|
||||
$goalDefinition['allow_multiple'] = true;
|
||||
} else {
|
||||
$goals = Request::processRequest('Goals.getGoals', ['idSite' => $this->idSite, 'filter_limit' => '-1'], $default = []);
|
||||
if (!isset($goals[$idGoal])) {
|
||||
Piwik::redirectToModule('Goals', 'index', array('idGoal' => null));
|
||||
}
|
||||
$goalDefinition = $goals[$idGoal];
|
||||
}
|
||||
|
||||
$this->setGeneralVariablesView($view);
|
||||
|
||||
$goal = $this->getMetricsForGoal($idGoal);
|
||||
foreach ($goal as $name => $value) {
|
||||
$view->$name = $value;
|
||||
}
|
||||
|
||||
if ($idGoal == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER) {
|
||||
$goal = $this->getMetricsForGoal(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART);
|
||||
foreach ($goal as $name => $value) {
|
||||
$name = 'cart_' . $name;
|
||||
$view->$name = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$view->idGoal = $idGoal;
|
||||
$view->goalAllowMultipleConversionsPerVisit = $goalDefinition['allow_multiple'];
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function getConversionsOverview()
|
||||
{
|
||||
$view = new View('@Ecommerce/conversionOverview');
|
||||
$idGoal = Common::getRequestVar('idGoal', null, 'string');
|
||||
$period = Common::getRequestVar('period', null, 'string');
|
||||
$segment = Common::getRequestVar('segment', '', 'string');
|
||||
$date = Common::getRequestVar('date', '', 'string');
|
||||
|
||||
$goalMetrics = Request::processRequest('Goals.get', [
|
||||
'idGoal' => $idGoal,
|
||||
'idSite' => $this->idSite,
|
||||
'date' => $date,
|
||||
'period' => $period,
|
||||
'segment' => $segment,
|
||||
'filter_limit' => '-1'
|
||||
], $default = []);
|
||||
|
||||
$dataRow = $goalMetrics->getFirstRow();
|
||||
|
||||
$view->idSite = $this->idSite;
|
||||
$view->idGoal = $idGoal;
|
||||
|
||||
if ($dataRow) {
|
||||
$view->revenue = $dataRow->getColumn('revenue');
|
||||
$view->revenue_subtotal = $dataRow->getColumn('revenue_subtotal');
|
||||
$view->revenue_tax = $dataRow->getColumn('revenue_tax');
|
||||
$view->revenue_shipping = $dataRow->getColumn('revenue_shipping');
|
||||
$view->revenue_discount = $dataRow->getColumn('revenue_discount');
|
||||
}
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function getEcommerceLog($fetch = false)
|
||||
{
|
||||
$saveGET = $_GET;
|
||||
$originalQuery = $_SERVER['QUERY_STRING'];
|
||||
|
||||
if (!empty($_GET['segment'])) {
|
||||
$_GET['segment'] = $_GET['segment'] . ';' . 'visitEcommerceStatus!=none';
|
||||
} else {
|
||||
$_GET['segment'] = 'visitEcommerceStatus!=none';
|
||||
}
|
||||
$_SERVER['QUERY_STRING'] = Http::buildQuery($_GET);
|
||||
|
||||
$_GET['widget'] = 1;
|
||||
$output = FrontController::getInstance()->dispatch('Live', 'getVisitorLog', array($fetch));
|
||||
$_GET = $saveGET;
|
||||
$_SERVER['QUERY_STRING'] = $originalQuery;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
52
msd2/tracking/piwik/plugins/Ecommerce/Ecommerce.php
Normal file
52
msd2/tracking/piwik/plugins/Ecommerce/Ecommerce.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?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\Columns\ComputedMetricFactory;
|
||||
use Piwik\Columns\MetricsList;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\ArchivedMetric;
|
||||
use Piwik\Plugin\ComputedMetric;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Ecommerce extends \Piwik\Plugin
|
||||
{
|
||||
|
||||
/**
|
||||
* @see \Piwik\Plugin::registerEvents
|
||||
*/
|
||||
public function registerEvents()
|
||||
{
|
||||
$hooks = array(
|
||||
'Metric.addComputedMetrics' => 'addComputedMetrics'
|
||||
);
|
||||
return $hooks;
|
||||
}
|
||||
|
||||
public function addComputedMetrics(MetricsList $list, ComputedMetricFactory $computedMetricFactory)
|
||||
{
|
||||
$category = 'Goals_Ecommerce';
|
||||
|
||||
$metrics = $list->getMetrics();
|
||||
foreach ($metrics as $metric) {
|
||||
if ($metric instanceof ArchivedMetric && $metric->getDimension()) {
|
||||
$metricName = $metric->getName();
|
||||
if ($metric->getDbTableName() === 'log_conversion'
|
||||
&& $metricName !== 'nb_uniq_orders'
|
||||
&& strpos($metricName, ArchivedMetric::AGGREGATION_SUM_PREFIX) === 0
|
||||
&& $metric->getCategoryId() === $category) {
|
||||
$metric = $computedMetricFactory->createComputedMetric($metric->getName(), 'nb_uniq_orders', ComputedMetric::AGGREGATION_AVG);
|
||||
$list->addMetric($metric);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
<?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\ProfileSummary;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Live\ProfileSummary\ProfileSummaryAbstract;
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
* Class EcommerceSummary
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
class EcommerceSummary extends ProfileSummaryAbstract
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return Piwik::translate('Goals_Ecommerce');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if (empty($this->profile['totalEcommerceRevenue'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$view = new View('@Ecommerce/_profileSummary.twig');
|
||||
$view->idSite = Common::getRequestVar('idSite', null, 'int');
|
||||
$view->visitorData = $this->profile;
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
}
|
73
msd2/tracking/piwik/plugins/Ecommerce/Reports/Base.php
Normal file
73
msd2/tracking/piwik/plugins/Ecommerce/Reports/Base.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?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->categoryId = '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)
|
||||
{
|
||||
$idSite = $infos['idSite'];
|
||||
|
||||
if (empty($idSite)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->isEcommerceEnabled($idSite);
|
||||
}
|
||||
|
||||
private function isEcommerceEnabled($idSite)
|
||||
{
|
||||
$site = new Site($idSite);
|
||||
|
||||
return $site->isEcommerceEnabled();
|
||||
}
|
||||
|
||||
}
|
167
msd2/tracking/piwik/plugins/Ecommerce/Reports/BaseItem.php
Normal file
167
msd2/tracking/piwik/plugins/Ecommerce/Reports/BaseItem.php
Normal file
@ -0,0 +1,167 @@
|
||||
<?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\DataTable;
|
||||
use Piwik\Metrics\Formatter;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\ViewDataTable;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\AveragePrice;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\AverageQuantity;
|
||||
use Piwik\Plugins\Goals\Columns\Metrics\ProductConversionRate;
|
||||
use Piwik\Plugins\Goals\Conversions;
|
||||
use Piwik\Plugins\Goals\Model;
|
||||
use Piwik\Report\ReportWidgetFactory;
|
||||
use Piwik\Widget\WidgetsList;
|
||||
|
||||
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()
|
||||
{
|
||||
// we do not check whether it is abondon carts if not set re performance improvements
|
||||
if ($this->isAbandonedCart($fetchIfNotSet = false)) {
|
||||
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 configureWidgets(WidgetsList $widgetsList, ReportWidgetFactory $factory)
|
||||
{
|
||||
$widgetsList->addToContainerWidget('Products', $factory->createWidget());
|
||||
}
|
||||
|
||||
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($fetchIfNotSet = true);
|
||||
}
|
||||
|
||||
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($fetchIfNotSet)
|
||||
{
|
||||
$abandonedCarts = Common::getRequestVar('abandonedCarts', '', 'string');
|
||||
|
||||
if ($abandonedCarts === '') {
|
||||
if ($fetchIfNotSet) {
|
||||
|
||||
$idSite = Common::getRequestVar('idSite', 0, 'int');
|
||||
$period = Common::getRequestVar('period', '', 'string');
|
||||
$date = Common::getRequestVar('date', '', 'string');
|
||||
|
||||
$conversion = new Conversions();
|
||||
$conversions = $conversion->getConversionForGoal(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER, $idSite, $period, $date);
|
||||
$cartNbConversions = $conversion->getConversionForGoal(Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART, $idSite, $period, $date);
|
||||
$preloadAbandonedCart = $cartNbConversions !== false && $conversions == 0;
|
||||
|
||||
if ($preloadAbandonedCart) {
|
||||
$abandonedCarts = '1';
|
||||
} else {
|
||||
$abandonedCarts = '0';
|
||||
}
|
||||
} else {
|
||||
$abandonedCarts = '0';
|
||||
}
|
||||
}
|
||||
|
||||
return $abandonedCarts == '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;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?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->subcategoryId = 'Goals_Products';
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
<?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 = 30;
|
||||
|
||||
$this->subcategoryId = 'Goals_Products';
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<?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 = 31;
|
||||
|
||||
$this->subcategoryId = 'Goals_Products';
|
||||
}
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
216
msd2/tracking/piwik/plugins/Ecommerce/VisitorDetails.php
Normal file
216
msd2/tracking/piwik/plugins/Ecommerce/VisitorDetails.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?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\Config;
|
||||
use Piwik\DataAccess\LogAggregator;
|
||||
use Piwik\Date;
|
||||
use Piwik\Db;
|
||||
use Piwik\Metrics\Formatter;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugins\Live\VisitorDetailsAbstract;
|
||||
use Piwik\Site;
|
||||
use Piwik\Tracker\Action;
|
||||
use Piwik\Tracker\GoalManager;
|
||||
use Piwik\Tracker\PageUrl;
|
||||
use Piwik\View;
|
||||
|
||||
class VisitorDetails extends VisitorDetailsAbstract
|
||||
{
|
||||
public function extendVisitorDetails(&$visitor)
|
||||
{
|
||||
$ecommerceMetrics = $this->queryEcommerceConversionsVisitorLifeTimeMetricsForVisitor($visitor['idSite'],
|
||||
$visitor['visitorId']);
|
||||
$visitor['totalEcommerceRevenue'] = $ecommerceMetrics['totalEcommerceRevenue'];
|
||||
$visitor['totalEcommerceConversions'] = $ecommerceMetrics['totalEcommerceConversions'];
|
||||
$visitor['totalEcommerceItems'] = $ecommerceMetrics['totalEcommerceItems'];
|
||||
|
||||
$visitor['totalAbandonedCartsRevenue'] = $ecommerceMetrics['totalAbandonedCartsRevenue'];
|
||||
$visitor['totalAbandonedCarts'] = $ecommerceMetrics['totalAbandonedCarts'];
|
||||
$visitor['totalAbandonedCartsItems'] = $ecommerceMetrics['totalAbandonedCartsItems'];
|
||||
}
|
||||
|
||||
public function provideActionsForVisitIds(&$actions, $idVisits)
|
||||
{
|
||||
$ecommerceDetails = $this->queryEcommerceConversionsForVisits($idVisits);
|
||||
|
||||
// use while / array_shift combination instead of foreach to save memory
|
||||
while (is_array($ecommerceDetails) && count($ecommerceDetails)) {
|
||||
$ecommerceDetail = array_shift($ecommerceDetails);
|
||||
|
||||
$idVisit = $ecommerceDetail['idvisit'];
|
||||
|
||||
unset($ecommerceDetail['idvisit']);
|
||||
|
||||
if ($ecommerceDetail['type'] == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART) {
|
||||
unset($ecommerceDetail['orderId']);
|
||||
unset($ecommerceDetail['revenueSubTotal']);
|
||||
unset($ecommerceDetail['revenueTax']);
|
||||
unset($ecommerceDetail['revenueShipping']);
|
||||
unset($ecommerceDetail['revenueDiscount']);
|
||||
}
|
||||
|
||||
// 25.00 => 25
|
||||
foreach ($ecommerceDetail as $column => $value) {
|
||||
if (strpos($column, 'revenue') !== false) {
|
||||
if ($value == round($value)) {
|
||||
$ecommerceDetail[$column] = round($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$idOrder = isset($ecommerceDetail['orderId']) ? $ecommerceDetail['orderId'] : GoalManager::ITEM_IDORDER_ABANDONED_CART;
|
||||
|
||||
$itemsDetails = $this->queryEcommerceItemsForOrder($idVisit, $idOrder);
|
||||
foreach ($itemsDetails as &$detail) {
|
||||
if ($detail['price'] == round($detail['price'])) {
|
||||
$detail['price'] = round($detail['price']);
|
||||
}
|
||||
}
|
||||
$ecommerceDetail['itemDetails'] = $itemsDetails;
|
||||
|
||||
$actions[$idVisit][] = $ecommerceDetail;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $idSite
|
||||
* @param $idVisitor
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function queryEcommerceConversionsVisitorLifeTimeMetricsForVisitor($idSite, $idVisitor)
|
||||
{
|
||||
$sql = $this->getSqlEcommerceConversionsLifeTimeMetricsForIdGoal(GoalManager::IDGOAL_ORDER);
|
||||
$ecommerceOrders = Db::fetchRow($sql, array($idSite, @Common::hex2bin($idVisitor)));
|
||||
|
||||
$sql = $this->getSqlEcommerceConversionsLifeTimeMetricsForIdGoal(GoalManager::IDGOAL_CART);
|
||||
$abandonedCarts = Db::fetchRow($sql, array($idSite, @Common::hex2bin($idVisitor)));
|
||||
|
||||
return array(
|
||||
'totalEcommerceRevenue' => $ecommerceOrders['lifeTimeRevenue'],
|
||||
'totalEcommerceConversions' => $ecommerceOrders['lifeTimeConversions'],
|
||||
'totalEcommerceItems' => $ecommerceOrders['lifeTimeEcommerceItems'],
|
||||
'totalAbandonedCartsRevenue' => $abandonedCarts['lifeTimeRevenue'],
|
||||
'totalAbandonedCarts' => $abandonedCarts['lifeTimeConversions'],
|
||||
'totalAbandonedCartsItems' => $abandonedCarts['lifeTimeEcommerceItems']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $ecommerceIdGoal
|
||||
* @return string
|
||||
*/
|
||||
protected function getSqlEcommerceConversionsLifeTimeMetricsForIdGoal($ecommerceIdGoal)
|
||||
{
|
||||
$sql = "SELECT
|
||||
COALESCE(SUM(" . LogAggregator::getSqlRevenue('revenue') . "), 0) as lifeTimeRevenue,
|
||||
COUNT(*) as lifeTimeConversions,
|
||||
COALESCE(SUM(" . LogAggregator::getSqlRevenue('items') . "), 0) as lifeTimeEcommerceItems
|
||||
FROM " . Common::prefixTable('log_visit') . " AS log_visit
|
||||
LEFT JOIN " . Common::prefixTable('log_conversion') . " AS log_conversion
|
||||
ON log_visit.idvisit = log_conversion.idvisit
|
||||
WHERE
|
||||
log_visit.idsite = ?
|
||||
AND log_visit.idvisitor = ?
|
||||
AND log_conversion.idgoal = " . $ecommerceIdGoal . "
|
||||
";
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $idVisit
|
||||
* @param $limit
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function queryEcommerceConversionsForVisits($idVisits)
|
||||
{
|
||||
$sql = "SELECT
|
||||
idvisit,
|
||||
case idgoal when " . GoalManager::IDGOAL_CART
|
||||
. " then '" . Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART
|
||||
. "' else '" . Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER . "' end as type,
|
||||
idorder as orderId,
|
||||
" . LogAggregator::getSqlRevenue('revenue') . " as revenue,
|
||||
" . LogAggregator::getSqlRevenue('revenue_subtotal') . " as revenueSubTotal,
|
||||
" . LogAggregator::getSqlRevenue('revenue_tax') . " as revenueTax,
|
||||
" . LogAggregator::getSqlRevenue('revenue_shipping') . " as revenueShipping,
|
||||
" . LogAggregator::getSqlRevenue('revenue_discount') . " as revenueDiscount,
|
||||
items as items,
|
||||
log_conversion.server_time as serverTimePretty,
|
||||
log_conversion.idlink_va
|
||||
FROM " . Common::prefixTable('log_conversion') . " AS log_conversion
|
||||
WHERE idvisit IN ('" . implode("','", $idVisits) . "')
|
||||
AND idgoal <= " . GoalManager::IDGOAL_ORDER . "
|
||||
ORDER BY idvisit, server_time ASC";
|
||||
$ecommerceDetails = Db::fetchAll($sql);
|
||||
return $ecommerceDetails;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $idVisit
|
||||
* @param $idOrder
|
||||
* @param $actionsLimit
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function queryEcommerceItemsForOrder($idVisit, $idOrder)
|
||||
{
|
||||
$sql = "SELECT
|
||||
log_action_sku.name as itemSKU,
|
||||
log_action_name.name as itemName,
|
||||
log_action_category.name as itemCategory,
|
||||
" . LogAggregator::getSqlRevenue('price') . " as price,
|
||||
quantity as quantity
|
||||
FROM " . Common::prefixTable('log_conversion_item') . "
|
||||
INNER JOIN " . Common::prefixTable('log_action') . " AS log_action_sku
|
||||
ON idaction_sku = log_action_sku.idaction
|
||||
LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_name
|
||||
ON idaction_name = log_action_name.idaction
|
||||
LEFT JOIN " . Common::prefixTable('log_action') . " AS log_action_category
|
||||
ON idaction_category = log_action_category.idaction
|
||||
WHERE idvisit = ?
|
||||
AND idorder = ?
|
||||
AND deleted = 0
|
||||
";
|
||||
|
||||
$bind = array($idVisit, $idOrder);
|
||||
|
||||
$itemsDetails = Db::fetchAll($sql, $bind);
|
||||
return $itemsDetails;
|
||||
}
|
||||
|
||||
public function initProfile($visits, &$profile)
|
||||
{
|
||||
if (Site::isEcommerceEnabledFor($visits->getFirstRow()->getColumn('idSite'))) {
|
||||
$profile['totalEcommerceRevenue'] = 0;
|
||||
$profile['totalEcommerceConversions'] = 0;
|
||||
$profile['totalEcommerceItems'] = 0;
|
||||
$profile['totalAbandonedCarts'] = 0;
|
||||
$profile['totalAbandonedCartsRevenue'] = 0;
|
||||
$profile['totalAbandonedCartsItems'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public function finalizeProfile($visits, &$profile)
|
||||
{
|
||||
$lastVisit = $visits->getLastRow();
|
||||
if ($lastVisit && Site::isEcommerceEnabledFor($lastVisit->getColumn('idSite'))) {
|
||||
$profile['totalEcommerceRevenue'] = $lastVisit->getColumn('totalEcommerceRevenue');
|
||||
$profile['totalEcommerceConversions'] = $lastVisit->getColumn('totalEcommerceConversions');
|
||||
$profile['totalEcommerceItems'] = $lastVisit->getColumn('totalEcommerceItems');
|
||||
$profile['totalAbandonedCartsRevenue'] = $lastVisit->getColumn('totalAbandonedCartsRevenue');
|
||||
$profile['totalAbandonedCarts'] = $lastVisit->getColumn('totalAbandonedCarts');
|
||||
$profile['totalAbandonedCartsItems'] = $lastVisit->getColumn('totalAbandonedCartsItems');
|
||||
}
|
||||
}
|
||||
}
|
@ -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\Widgets;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Widget\WidgetConfig;
|
||||
use Piwik\Site;
|
||||
|
||||
class GetEcommerceLog extends \Piwik\Widget\Widget
|
||||
{
|
||||
public static function configure(WidgetConfig $config)
|
||||
{
|
||||
$config->setCategoryId('Goals_Ecommerce');
|
||||
$config->setSubcategoryId('Goals_EcommerceLog');
|
||||
$config->setName('Goals_EcommerceLog');
|
||||
|
||||
$idSite = Common::getRequestVar('idSite', 0, 'int');
|
||||
if (empty($idSite)) {
|
||||
$config->disable();
|
||||
return;
|
||||
}
|
||||
|
||||
$site = new Site($idSite);
|
||||
$config->setIsEnabled($site->isEcommerceEnabled());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
<?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\Widgets;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Plugins\CoreHome\CoreHome;
|
||||
use Piwik\Site;
|
||||
use Piwik\Widget\WidgetContainerConfig;
|
||||
|
||||
class ProductsByDimension extends WidgetContainerConfig
|
||||
{
|
||||
protected $layout = CoreHome::WIDGET_CONTAINER_LAYOUT_BY_DIMENSION;
|
||||
protected $id = 'Products';
|
||||
protected $categoryId = 'Goals_Ecommerce';
|
||||
protected $subcategoryId = 'Goals_Products';
|
||||
|
||||
public function isEnabled()
|
||||
{
|
||||
$idSite = Common::getRequestVar('idSite', false, 'int');
|
||||
|
||||
if (empty($idSite)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$site = new Site($idSite);
|
||||
return $site->isEcommerceEnabled();
|
||||
}
|
||||
}
|
5
msd2/tracking/piwik/plugins/Ecommerce/lang/bg.json
Normal file
5
msd2/tracking/piwik/plugins/Ecommerce/lang/bg.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Продажби"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/cs.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/cs.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Objednávka",
|
||||
"Orders": "Objednávky",
|
||||
"SalesBy": "Tržby podle %s",
|
||||
"SalesAdjective": "Tržby %s",
|
||||
"NumberOfItems": "Počet položek v košíku",
|
||||
"OrderValue": "Hodnota objednávky",
|
||||
"LifeTimeValue": "Hodnota životnosti e-komerce",
|
||||
"LifeTimeValueDescription": "Celkový příjem příslušící tomuto zákazníkovi za všechny návštěvy: součet příjmů za všechny objednávky e-komerce návštěvníka s id %s.",
|
||||
"VisitorProfileLTV": "Za dobu životnosti vytvořil příjem %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "V %2$s objednávkách e-komerce zakoupil %1$s položek.",
|
||||
"VisitorProfileAbandonedCartSummary": "Opuštěno %1$s košíků zahrnujících %2$s položek celkem za %3$s."
|
||||
}
|
||||
}
|
8
msd2/tracking/piwik/plugins/Ecommerce/lang/da.json
Normal file
8
msd2/tracking/piwik/plugins/Ecommerce/lang/da.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-handel lader dig registrere når en kunde tilføjer en vare til kurven og når de udfører et køb. Man kan også registrere når der bliver set på varer og kategorier og når en handel afbrydes.",
|
||||
"Sales": "Salg",
|
||||
"SalesBy": "Salg af %s",
|
||||
"SalesAdjective": "Salg %s"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/de.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/de.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Mit E-Commerce 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",
|
||||
"Order": "Bestellung",
|
||||
"Orders": "Bestellungen",
|
||||
"SalesBy": "Umsatz nach %s",
|
||||
"SalesAdjective": "Umsatz %s",
|
||||
"NumberOfItems": "Anzahl an Artikeln im Warenkorb",
|
||||
"OrderValue": "Bestellwert",
|
||||
"LifeTimeValue": "E-Commerce Gesamtumsatz",
|
||||
"LifeTimeValueDescription": "Die gesamten E-Commerce-Umsätze, die diesem Kunden bei allen Besuchen zugeschrieben werden: die Summe der Umsätze aller E-Commerce-Aufträge für Besucher-ID %s.",
|
||||
"VisitorProfileLTV": "Generierter Gesamtumsatz von %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "%1$s Artikel in %2$s E-Commerce Bestellungen gekauft.",
|
||||
"VisitorProfileAbandonedCartSummary": "%1$s verwaiste Warenkörbe mit %2$s Artikeln und einem Gesamtwert von %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/el.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/el.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Το Ecommerce σας επιτρέπει να παρακολουθείτε τους χρήστες όταν προσθέτουν προϊόντα στο καλάθι αγορών και όταν γίνεται μετατροπή σε πώληση ηλ. εμπορίου. Παράλληλα να παρακολουθούνται προϊόντα και επισκέψειες κατηγοριών προϊόντων και καλάθια που δεν έγιναν αγορές.",
|
||||
"Sales": "Πωλήσεις",
|
||||
"Order": "Παραγγελία",
|
||||
"Orders": "Παραγγελίες",
|
||||
"SalesBy": "Πωλήσεις ανά %s",
|
||||
"SalesAdjective": "Πωλήσεις %s",
|
||||
"NumberOfItems": "Αριθμός αντικειμένων στο καλάθι",
|
||||
"OrderValue": "Αξία παραγγελίας",
|
||||
"LifeTimeValue": "Αξία Χρόνου Ζωής Ηλεκτρονικού Εμπορίου",
|
||||
"LifeTimeValueDescription": "Συνολικά έσοδα από τον πελάτη από όλες τις επισκέψεις: το σύνολο των εσόδων από όλες τις παραγγελίες ηλεκτρονικού εμπορίου για τον πελάτη με αναγνωριστικό %s.",
|
||||
"VisitorProfileLTV": "Παράχθηκαν έσοδα στο χρόνο ζωής της τάξης του %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Αγοράστηκαν %1$s αντικείμενα σε %2$s παραγγελίες ηλεκτρονικού εμπορίου.",
|
||||
"VisitorProfileAbandonedCartSummary": "Ακυρώθηκαν %1$s καλάθια αγορών συμπεριλαμβανομένων %2$s αντικειμένων συνολικής αξίας %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/en.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/en.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Order",
|
||||
"Orders": "Orders",
|
||||
"SalesBy": "Sales by %s",
|
||||
"SalesAdjective": "Sales %s",
|
||||
"NumberOfItems": "Number of Items in Cart",
|
||||
"OrderValue": "Order value",
|
||||
"LifeTimeValue": "Ecommerce Life Time Value",
|
||||
"LifeTimeValueDescription": "Total Ecommerce revenue attributed to this customer across all visits: the sum of revenue of all Ecommerce orders for Visitor ID %s.",
|
||||
"VisitorProfileLTV": "Generated a Life Time Revenue of %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Purchased %1$s items in %2$s ecommerce orders.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abandoned %1$s carts including %2$s items worth a total of %3$s."
|
||||
}
|
||||
}
|
13
msd2/tracking/piwik/plugins/Ecommerce/lang/es-ar.json
Normal file
13
msd2/tracking/piwik/plugins/Ecommerce/lang/es-ar.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "eCommerce te permite hacer un seguimiento de los usuarios al agregar productos a sus changuitos, y cuando realizan una compra en línea. También hace un seguimiento de los productos y las vistas de categorías de productos, así como los changuitos abandonados.",
|
||||
"Sales": "Ventas",
|
||||
"SalesBy": "Ventas por %s",
|
||||
"SalesAdjective": "Ventas %s",
|
||||
"LifeTimeValue": "Valor de vida útil de eCommerce",
|
||||
"LifeTimeValueDescription": "Los ingresos totales de eCommerce atribuidos a este consumidor en todas sus visitas: la suma de todas las órdenes de eCommerce para el visitante con identificación %s.",
|
||||
"VisitorProfileLTV": "Generó un ingreso útil de %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Compró %1$s elementos en %2$s órdenes de eCommerce.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abandonó %1$s changuitos, incluyendo %2$s elementos con un valor total de %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/es.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/es.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Pedido",
|
||||
"Orders": "Pedidos",
|
||||
"SalesBy": "Ventas por %s",
|
||||
"SalesAdjective": "Ventas %s",
|
||||
"NumberOfItems": "Número de elementos en el carrito",
|
||||
"OrderValue": "Valor del pedido",
|
||||
"LifeTimeValue": "Ingresos atribuidos al cliente durante el tiempo que fue cliente: \"Ecommerce Life Time Value\"",
|
||||
"LifeTimeValueDescription": "Ingresos totales por Ecommerce atribuidos a este cliente a lo largo de todas las visitas: la suma de los ingresos de todas las compras para el visitante %s",
|
||||
"VisitorProfileLTV": "Generó un Life Time Revenue de %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Compró %1$s artículos en %2$s compras ecommerce.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abandonó %1$s carritos de compra que incluían %2$s artículos por un valor total de %3$s."
|
||||
}
|
||||
}
|
6
msd2/tracking/piwik/plugins/Ecommerce/lang/et.json
Normal file
6
msd2/tracking/piwik/plugins/Ecommerce/lang/et.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Müük",
|
||||
"SalesAdjective": "Müük %s"
|
||||
}
|
||||
}
|
8
msd2/tracking/piwik/plugins/Ecommerce/lang/fi.json
Normal file
8
msd2/tracking/piwik/plugins/Ecommerce/lang/fi.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-kauppa mahdollistaa myyntiin liittyvien toimintojen seuraamisen: tuotteiden lisäämisen ostoskoriin ja ostosten tekemisen. Myös tuotteiden ja tuotekategorioiden katselu, ja hylätyt ostoskorit seurataan.",
|
||||
"Sales": "Myynnit",
|
||||
"SalesBy": "Myynnit %s:n mukaan",
|
||||
"SalesAdjective": "Myynnit %s"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/fr.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/fr.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Commande",
|
||||
"Orders": "Commandes",
|
||||
"SalesBy": "Ventes par %s",
|
||||
"SalesAdjective": "Ventes %s",
|
||||
"NumberOfItems": "Nombre d'éléments dans le panier",
|
||||
"OrderValue": "Valeur de la commande",
|
||||
"LifeTimeValue": "Valeur e-Commerce globale",
|
||||
"LifeTimeValueDescription": "Revenu E-Commerce total attribué à ce client sur le total de ses visites : somme du chiffre d'affaire de toutes les commandes E-commerce du visiteur ID %s.",
|
||||
"VisitorProfileLTV": "A généré un revenu total de %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "%1$s articles achetés en %2$s commandes e-commerce.",
|
||||
"VisitorProfileAbandonedCartSummary": "A abandonné %1$s cadis contenant %2$s articles avec une valeur totale de %3$s."
|
||||
}
|
||||
}
|
8
msd2/tracking/piwik/plugins/Ecommerce/lang/hi.json
Normal file
8
msd2/tracking/piwik/plugins/Ecommerce/lang/hi.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "वे एक ई-कॉमर्स बिक्री कन्वर्ट करने के लिए जब ई-कॉमर्स उपयोगकर्ताओं गाड़ियां करने के लिए उत्पादों को जोड़ने जब आप ट्रैक कर सकते हैं, और। इसके अलावा उत्पादों और उत्पाद श्रेणियों के विचार को त्याग दिया और गाड़ियां ट्रैक।",
|
||||
"Sales": "बिक्री",
|
||||
"SalesBy": "%s द्वारा बिक्री",
|
||||
"SalesAdjective": "बिक्री %s"
|
||||
}
|
||||
}
|
7
msd2/tracking/piwik/plugins/Ecommerce/lang/id.json
Normal file
7
msd2/tracking/piwik/plugins/Ecommerce/lang/id.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Penjualan",
|
||||
"SalesBy": "Penjualan oleh %s",
|
||||
"SalesAdjective": "Penjualan %s"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/it.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/it.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Ordine",
|
||||
"Orders": "Ordini",
|
||||
"SalesBy": "Vendite per %s",
|
||||
"SalesAdjective": "Vendite %s",
|
||||
"NumberOfItems": "Numero di articoli nel Carrello",
|
||||
"OrderValue": "Valore ordine",
|
||||
"LifeTimeValue": "Incasso Complessivo Ecommerce",
|
||||
"LifeTimeValueDescription": "Ricavo totale Ecommerce attribuito a questo cliente durante tutte le sue visite: la somma degli incassi di tutti gli ordini commerce per l'ID Visitatore %s.",
|
||||
"VisitorProfileLTV": "Generato un Incasso Complessivo di %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Acquistati %1$s articoli in %2$s ordini ecommerce.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abbandonati %1$s carrelli contenenti %2$s articoli per un valore di %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/ja.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/ja.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E コマースでは、いつユーザーがカートに製品を追加し、いつ E コマース販売に結びついたか、を追跡できます。製品、製品のカテゴリビュー、および放棄されたカートも追跡できます。",
|
||||
"Sales": "売り上げ",
|
||||
"Order": "注文",
|
||||
"Orders": "注文",
|
||||
"SalesBy": "%s 別売り上げ高",
|
||||
"SalesAdjective": "売り上げ %s",
|
||||
"NumberOfItems": "カートに入っているアイテム数",
|
||||
"OrderValue": "注文額",
|
||||
"LifeTimeValue": "e コマース通算値",
|
||||
"LifeTimeValueDescription": "すべてのビジットでこの顧客に起因する e コマースの収益の合計:ビジター ID %s のすべての e コマース注文の収益の合計。",
|
||||
"VisitorProfileLTV": "%1$s の通算収益を生成しました。",
|
||||
"VisitorProfileItemsAndOrders": "%2$s の e コマース注文で %1$s アイテムを購入しました。",
|
||||
"VisitorProfileAbandonedCartSummary": "合計 %3$s 中 %2$s アイテムを含む %1$s のカートを放棄しました。"
|
||||
}
|
||||
}
|
8
msd2/tracking/piwik/plugins/Ecommerce/lang/nb.json
Normal file
8
msd2/tracking/piwik/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"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/nl.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/nl.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Bestelling",
|
||||
"Orders": "Bestellingen",
|
||||
"SalesBy": "Verkopen per %s",
|
||||
"SalesAdjective": "Verkopen %s",
|
||||
"NumberOfItems": "Aantal items in winkelwagen",
|
||||
"OrderValue": "Bestelwaarde",
|
||||
"LifeTimeValue": "E-commerce Life Time Waarde",
|
||||
"LifeTimeValueDescription": "Totale e-commerce omzet toegekend aan deze klant over al zijn bezoeken: de som van omzet van alle e-commerce orders voor Visitor ID %s.",
|
||||
"VisitorProfileLTV": "Gegenereerde levenslange omzet van %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Gekochte %1$s items in %2$s ecommerce orders.",
|
||||
"VisitorProfileAbandonedCartSummary": "%1$s verlaten winkelwagens inclusief %2$s items met een totale waarde van %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pl.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pl.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce pozwala śledzić kiedy odwiedzający dodają produkty do koszyków oraz kiedy następuje konwersja koszyków na sprzedaż. Pozwala również śledzić produkty i ich kategorie oraz porzucone koszyki.",
|
||||
"Sales": "Sprzedaż",
|
||||
"Order": "Zamówienie",
|
||||
"Orders": "Zamówienia",
|
||||
"SalesBy": "Sprzedaż według %s",
|
||||
"SalesAdjective": "Sprzedaż %s",
|
||||
"NumberOfItems": "Liczba produktów w koszyku",
|
||||
"OrderValue": "Wartość zamówienia",
|
||||
"LifeTimeValue": "Łączna wartość zakupów",
|
||||
"LifeTimeValueDescription": "Całkowita sprzedaż przypisana do tego użytkownika w trakcie wszystkich wizyt: suma sprzedaży dla użytkownika o numerze %s.",
|
||||
"VisitorProfileLTV": "Zakupił na łączną kwotę %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Zakupiono %1$s przedmiotów w %2$s zamówieniach.",
|
||||
"VisitorProfileAbandonedCartSummary": "Porzucono %1$s koszyków zawierających %2$s przedmiotów o łącznej wartości %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pt-br.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pt-br.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"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",
|
||||
"Order": "Pedido",
|
||||
"Orders": "Pedidos",
|
||||
"SalesBy": "Vendas por %s",
|
||||
"SalesAdjective": "Vendas %s",
|
||||
"NumberOfItems": "Números de itens no carrinho",
|
||||
"OrderValue": "Valor do pedido",
|
||||
"LifeTimeValue": "Ecommerce valor do tempo de vida",
|
||||
"LifeTimeValueDescription": "Receita total da loja atribuída a esse cliente em todas as visitas: a soma da receita de todos os pedidos da loja para o ID do visitante %s.",
|
||||
"VisitorProfileLTV": "Gerou uma receita de tempo de vida de %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Comprou %1$s itens em %2$s pedidos na loja.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abandonou %1$s carrinhos, incluindo %2$s itens no total de %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pt.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/pt.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "O Ecommerce permite-lhe acompanhar quando os utilizadores adicionam produtos a carrinhos e quando estes são convertidos numa venda de comércio eletrónico. Também permite acompanhar visualizações de produtos e categorias de produtos, e carrinhos abandonados.",
|
||||
"Sales": "Vendas",
|
||||
"Order": "Pedido",
|
||||
"Orders": "Pedidos",
|
||||
"SalesBy": "Vendas por %s",
|
||||
"SalesAdjective": "%s vendas",
|
||||
"NumberOfItems": "Número de itens no carrinho",
|
||||
"OrderValue": "Valor do pedido",
|
||||
"LifeTimeValue": "Valor do tempo de vida do comércio eletrónico",
|
||||
"LifeTimeValueDescription": "Receita total de comércio eletrónico atribuído a este cliente globalmente em todas as visitas: o somatório da receita de todos os pedidos de comércio eletrónico para o ID do visitante %s.",
|
||||
"VisitorProfileLTV": "Gerou uma receita ao longo do tempo de vida de %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Adquiriu %1$s itens em %2$s pedidos de comércio eletrónico.",
|
||||
"VisitorProfileAbandonedCartSummary": "Abandonou %1$s carrinhos que incluíam %2$s itens com um valor total de %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/ru.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/ru.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Ecommerce позволяет вам отслеживать, когда пользователи добавляют продукты в корзины, и когда они преобразовываются в распродажу ecommerce. Также отслеживайте просмотр продуктов и категорий продуктов, и оставленные корзины.",
|
||||
"Sales": "Продажи",
|
||||
"Order": "Заказ",
|
||||
"Orders": "Заказы",
|
||||
"SalesBy": "Продаж по %s",
|
||||
"SalesAdjective": "Продаж %s",
|
||||
"NumberOfItems": "Количество товаров в корзине",
|
||||
"OrderValue": "Стоимость заказа",
|
||||
"LifeTimeValue": "Электронная коммерция Life Time Value",
|
||||
"LifeTimeValueDescription": "Общий доход электронной торговли, связанный с этим клиентом за все посещения: сумма доходов всех заказов электронной торговли для идентификатора посетителя %s.",
|
||||
"VisitorProfileLTV": "Получено пожизненного дохода %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Куплено %1$s товаров в %2$s заказах электронной коммерции.",
|
||||
"VisitorProfileAbandonedCartSummary": "%1$s заброшенных корзин, включая %2$s товаров общей стоимостью %3$s."
|
||||
}
|
||||
}
|
7
msd2/tracking/piwik/plugins/Ecommerce/lang/sk.json
Normal file
7
msd2/tracking/piwik/plugins/Ecommerce/lang/sk.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "Predaje",
|
||||
"SalesBy": "Predaje podľa %s",
|
||||
"SalesAdjective": "Predaje %s"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/sq.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/sq.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-tregtia ju lejon të ndiqni se kur shtojnë produkte në shporta përdoruesit, dhe kur ato shndërrohen në shitje e-tregtie. Ajo ndjek gjithashtu parje produktesh dhe kategorish produktesh apo shporta të braktisura.",
|
||||
"Sales": "Shitje",
|
||||
"Order": "Porosi",
|
||||
"Orders": "Porosi",
|
||||
"SalesBy": "Shitje nga %s",
|
||||
"SalesAdjective": "Shitje %s",
|
||||
"NumberOfItems": "Numër Artikujsh në Shportë",
|
||||
"OrderValue": "Vlerë porosie",
|
||||
"LifeTimeValue": "Vlerë E-tregti Gjatë Ekzistencës",
|
||||
"LifeTimeValueDescription": "Të ardhura e-tregtie gjithsej atribuar këtij përdoruesi përmes krejt vizitave: shuma e të ardhurave për krejt porositë E-tregti për ID Vizitori %s.",
|
||||
"VisitorProfileLTV": "Prodhoi Të ardhura Gjatë Ekzistencës sa %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Bleu %1$s artikuj në %2$s porosi e-tregtie.",
|
||||
"VisitorProfileAbandonedCartSummary": "Braktisi %1$s shporta, përfshi %2$s artikuj me vlerë %3$s gjithsej."
|
||||
}
|
||||
}
|
13
msd2/tracking/piwik/plugins/Ecommerce/lang/sr.json
Normal file
13
msd2/tracking/piwik/plugins/Ecommerce/lang/sr.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"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",
|
||||
"LifeTimeValue": "Ukupna vrednost elektronskih porudžbina",
|
||||
"LifeTimeValueDescription": "Ukupan prihod od elektronskih porudžbina ovog korisnika kroz sve posete: suma prihoda svih porudžbina za identifikator posetioca %s.",
|
||||
"VisitorProfileLTV": "Generisao je ukupan prihod od %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Poručio je %1$s predmeta u %2$s elektronskih porudžbina.",
|
||||
"VisitorProfileAbandonedCartSummary": "Otkazao je %1$s korpi sa ukupno %2$s predmeta u ukupnoj vrednosti od %3$s."
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/sv.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/sv.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-handel möjliggör för dig att spåra när en användare lägger till produkter i varukorgen och när de konverterar till en e-handelsförsäljning. Du kan även spåra visningar av produkter och produktkategorier samt övergivna varukorgar.",
|
||||
"Sales": "Försäljning",
|
||||
"Order": "Order",
|
||||
"Orders": "Ordrar",
|
||||
"SalesBy": "Försäljning genom %s",
|
||||
"SalesAdjective": "Försäljning %s",
|
||||
"NumberOfItems": "Antal artiklar i Varukorgen",
|
||||
"OrderValue": "Ordervärde",
|
||||
"LifeTimeValue": "E-handel livstid värde",
|
||||
"LifeTimeValueDescription": "Summan av alla e-handelsinkomster som tilldelats denna kund i alla besök: summan av intäkterna för alla e-handelsorder för Visitor ID %s.",
|
||||
"VisitorProfileLTV": "Genererade Life Time Revenue för %1$s.",
|
||||
"VisitorProfileItemsAndOrders": "Har köpt %1$s artiklar i %2$s e-handelsordrar.",
|
||||
"VisitorProfileAbandonedCartSummary": "Har övergivit %1$s varukorgar med %2$s artiklar till ett totalt värde av %3$s."
|
||||
}
|
||||
}
|
7
msd2/tracking/piwik/plugins/Ecommerce/lang/ta.json
Normal file
7
msd2/tracking/piwik/plugins/Ecommerce/lang/ta.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"Sales": "விற்பனை",
|
||||
"SalesBy": "விற்பனை %s விழுக்காட்டில்",
|
||||
"SalesAdjective": "விற்பனை %s விழுக்காடு"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/tr.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/tr.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "E-ticaret, bir e-ticaret satışı yapıldığında kullanıcıların ürünleri sepete ekleme ve satın alma işlemlerinin izlenmesini sağlar. Ayrıca ürün, ürün kategorileri görünümü ve terk edilen sepetleri de izler.",
|
||||
"Sales": "Satışlar",
|
||||
"Order": "Sipariş",
|
||||
"Orders": "Sipariş",
|
||||
"SalesBy": "%s bazında satışlar",
|
||||
"SalesAdjective": "Satışlar %s",
|
||||
"NumberOfItems": "Sepetteki Öge Sayısı",
|
||||
"OrderValue": "Sipariş değeri",
|
||||
"LifeTimeValue": "Ömür Boyu E-ticaret Değeri",
|
||||
"LifeTimeValueDescription": "Bu müşterinin tüm ziyaretlerinden elde edilen toplam e-ticaret geliri. %s ziyaretçi kodu için tüm e-ticaret siparişleri gelirlerinin toplamı.",
|
||||
"VisitorProfileLTV": "%1$s tarafından ömür boyunca elde edilen gelir.",
|
||||
"VisitorProfileItemsAndOrders": "%2$s e-ticaret siparişi ile %1$s öge satın almış.",
|
||||
"VisitorProfileAbandonedCartSummary": "%3$s değerindeki %2$s ögeyi içeren %1$s sepet terk edilmiş."
|
||||
}
|
||||
}
|
14
msd2/tracking/piwik/plugins/Ecommerce/lang/uk.json
Normal file
14
msd2/tracking/piwik/plugins/Ecommerce/lang/uk.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Електронна комерція дозволяє відстежувати, коли користувачі додали товар у кошик, і що вони хочуть придбати. Також відстежуються продукти і категорії продуктів і кинуті кошики.",
|
||||
"Sales": "Продажі",
|
||||
"Order": "Замовлення",
|
||||
"Orders": "Замовлення",
|
||||
"SalesBy": "Продано %s",
|
||||
"SalesAdjective": "Продажів %s",
|
||||
"NumberOfItems": "Кількість товарів у кошику",
|
||||
"OrderValue": "Вартість замовлення",
|
||||
"LifeTimeValueDescription": "Загальний дохід від електронної комерції, який призначається цьому клієнтові за всі відвідування: сума доходу від усіх замовлень електронної комерції для ідентифікатора відвідувача %s.",
|
||||
"VisitorProfileAbandonedCartSummary": "Покинуто%1$s кошиків, в тому числі %2$s товарів на загальну суму %3$s."
|
||||
}
|
||||
}
|
5
msd2/tracking/piwik/plugins/Ecommerce/lang/vi.json
Normal file
5
msd2/tracking/piwik/plugins/Ecommerce/lang/vi.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "Thương mại điện tử cho phép bạn theo dõi khi người dùng thêm sản phẩm vào giỏ, và khi họ chuyển đổi để bán hàng thương mại điện tử. Nó cũng theo dõi các sản phẩm và xem các loại sản phẩm và các đơn hàng bị bỏ."
|
||||
}
|
||||
}
|
13
msd2/tracking/piwik/plugins/Ecommerce/lang/zh-cn.json
Normal file
13
msd2/tracking/piwik/plugins/Ecommerce/lang/zh-cn.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "电子商务插件可以让您追踪用户何时添加商品到购物车,何时转化为电子商务销售。它也可以追踪产品和产品分类的浏览以及被放弃的购物车信息。",
|
||||
"Sales": "销售",
|
||||
"SalesBy": "由%s销售",
|
||||
"SalesAdjective": "销售%s",
|
||||
"LifeTimeValue": "电商终生价值",
|
||||
"LifeTimeValueDescription": "电子商务总收入由此客户的全部行为而来:访客编码%s的所有电商订单的收入总和。",
|
||||
"VisitorProfileLTV": "生成一个%1$s的终生收入。",
|
||||
"VisitorProfileItemsAndOrders": "在%2$s电商订单中共购买了%1$s个商品。",
|
||||
"VisitorProfileAbandonedCartSummary": "被放弃的%1$s购物车包含了%2$s个商品,总值%3$s。"
|
||||
}
|
||||
}
|
17
msd2/tracking/piwik/plugins/Ecommerce/lang/zh-tw.json
Normal file
17
msd2/tracking/piwik/plugins/Ecommerce/lang/zh-tw.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"Ecommerce": {
|
||||
"PluginDescription": "電子商務讓你可以在使用者將產品增加到購物車,或是轉換電子商務銷售時追蹤。也追蹤產品、產品分類查看數以及棄用的購物車。",
|
||||
"Sales": "銷售",
|
||||
"Order": "訂單",
|
||||
"Orders": "訂單",
|
||||
"SalesBy": "由 %s 銷售",
|
||||
"SalesAdjective": "銷售 %s",
|
||||
"NumberOfItems": "購物車中的項目數量",
|
||||
"OrderValue": "訂單值",
|
||||
"LifeTimeValue": "電子商務總期間價值",
|
||||
"LifeTimeValueDescription": "這位顧客在所有訪問中的電子商務收益總計:屬於訪客 ID %s 的所有電子商務訂單收益總和。",
|
||||
"VisitorProfileLTV": "為 %1$s 產生總期間收益。",
|
||||
"VisitorProfileItemsAndOrders": "在 %2$s 個訂單中購買了 %1$s 項商品。",
|
||||
"VisitorProfileAbandonedCartSummary": "棄用了 %1$s 個購物車,包含 %2$s 項商品,總價值 %3$s。"
|
||||
}
|
||||
}
|
3
msd2/tracking/piwik/plugins/Ecommerce/plugin.json
Normal file
3
msd2/tracking/piwik/plugins/Ecommerce/plugin.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "Ecommerce"
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<div class="visitor-profile-summary visitor-profile-lifetimevalue">
|
||||
<h1>{{ 'Goals_Ecommerce'|translate }}</h1>
|
||||
<div>
|
||||
<p title="{{ 'Ecommerce_LifeTimeValueDescription'|translate(visitorData.visitorId) }}">
|
||||
{{ 'Ecommerce_VisitorProfileLTV'|translate( "<strong>" ~ visitorData.totalEcommerceRevenue|money(idSite) ~ "</strong>")|raw }}
|
||||
{{ 'Ecommerce_VisitorProfileItemsAndOrders'|translate("<strong>" ~ visitorData.totalEcommerceItems ~ "</strong>", "<strong>" ~ visitorData.totalEcommerceConversions ~ "</strong>")|raw }}
|
||||
</p>
|
||||
<p>
|
||||
{%- if visitorData.totalAbandonedCarts|default(0) > 0 %}
|
||||
{{ 'Ecommerce_VisitorProfileAbandonedCartSummary'|translate('<strong>' ~ visitorData.totalAbandonedCarts ~ '</strong>', '<strong>' ~ visitorData.totalAbandonedCartsItems ~ '</strong>', '<strong>' ~ visitorData.totalAbandonedCartsRevenue|money(idSite) ~ '</strong>')|raw }}
|
||||
{%- endif -%}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,22 @@
|
||||
<div piwik-content-block
|
||||
content-title="{{ 'Goals_ConversionsOverview'|translate|e('html_attr') }}">
|
||||
<ul class="ulGoalTopElements">
|
||||
{{ 'General_ColumnRevenue'|translate }}: {{ revenue|money(idSite)|raw -}}
|
||||
{% if revenue_subtotal is not empty %},
|
||||
{{ 'General_Subtotal'|translate }}: {{ revenue_subtotal|money(idSite)|raw -}}
|
||||
{% endif %}
|
||||
{%- if revenue_tax is not empty -%},
|
||||
{{ 'General_Tax'|translate }}: {{ revenue_tax|money(idSite)|raw -}}
|
||||
{% endif %}
|
||||
{%- if revenue_shipping is not empty -%},
|
||||
{{ 'General_Shipping'|translate }}: {{ revenue_shipping|money(idSite)|raw -}}
|
||||
{% endif %}
|
||||
{%- if revenue_discount is not empty -%},
|
||||
{{ 'General_Discount'|translate }}: {{ revenue_discount|money(idSite)|raw -}}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<a href="javascript:;" class="segmentedlog" onclick="SegmentedVisitorLog.show('Goals.getMetrics', 'visitConvertedGoalId=={{ idGoal }}', {})">
|
||||
<span class="icon-visitor-profile rowActionIcon"></span> {{ 'Live_RowActionTooltipWithDimension'|translate('General_Goal'|translate) }}
|
||||
</a>
|
||||
<br style="clear:left"/>
|
||||
</div>
|
@ -0,0 +1,73 @@
|
||||
<div class="card"><div class="card-content">
|
||||
<div id='leftcolumn' style="clear:both;{% if not isWidget %}width:33%;'{% endif %}">
|
||||
<div class="sparkline">{{ sparkline(urlSparklineConversions) }}
|
||||
<div>
|
||||
<strong>{{ nb_conversions|number }}</strong>
|
||||
{{ 'General_EcommerceOrders'|translate }}
|
||||
<img src='plugins/Morpheus/images/ecommerceOrder.png'>
|
||||
|
||||
{% if goalAllowMultipleConversionsPerVisit is defined and goalAllowMultipleConversionsPerVisit %}
|
||||
({{ 'General_NVisits'|translate("<strong>"~nb_visits_converted~"</strong>")|raw }})
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sparkline">
|
||||
{{ sparkline(urlSparklineRevenue) }}
|
||||
<div>
|
||||
{% set revenue=revenue|money(idSite) %}
|
||||
<strong>{{ revenue|raw }}</strong> {{ 'General_TotalRevenue'|translate }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sparkline">{{ sparkline(urlSparklineAverageOrderValue) }}
|
||||
<div>
|
||||
<strong>{{ avg_order_revenue|money(idSite)|raw }}</strong>
|
||||
{{ 'General_AverageOrderValue'|translate }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='leftcolumn' {% if not isWidget %}style='width:33%;'{% endif %}>
|
||||
<div class="sparkline">{{ sparkline(urlSparklineConversionRate) }}
|
||||
<div>
|
||||
{% set ecommerceOrdersText %}{{ 'General_EcommerceOrders'|translate }}{% endset %}
|
||||
{{ 'Goals_ConversionRate'|translate("<strong>"~conversion_rate|percent~"</strong> "~ecommerceOrdersText)|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="sparkline">{{ sparkline(urlSparklinePurchasedProducts) }}
|
||||
<div>
|
||||
<strong>{{ items|number }}</strong> {{ 'General_PurchasedProducts'|translate }}</div></div>
|
||||
</div>
|
||||
<div id='rightcolumn' {% if not isWidget %}style='width:30%;'{% endif %}>
|
||||
<div>
|
||||
<img src='plugins/Morpheus/images/ecommerceAbandonedCart.png'> {{ 'General_AbandonedCarts'|translate }}
|
||||
</div>
|
||||
|
||||
<div class="sparkline">
|
||||
{{ sparkline(cart_urlSparklineConversions) }}
|
||||
<div>
|
||||
{% set ecommerceAbandonedCartsText %}{{ 'Goals_AbandonedCart'|translate }}{% endset %}
|
||||
<strong>{{ cart_nb_conversions|number }}</strong> {{ 'General_VisitsWith'|translate(ecommerceAbandonedCartsText) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sparkline">
|
||||
{{ sparkline(cart_urlSparklineRevenue) }}
|
||||
<div>
|
||||
{% set revenue %}{{ cart_revenue|money(idSite)|raw }}{% endset %}
|
||||
{% set revenueText %}{{ 'General_ColumnRevenue'|translate }}{% endset %}
|
||||
<strong>{{ revenue }}</strong> {{ 'Goals_LeftInCart'|translate(revenueText) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sparkline">
|
||||
{{ sparkline(cart_urlSparklineConversionRate) }}
|
||||
<div>
|
||||
<strong>{{ cart_conversion_rate|percent }}</strong>
|
||||
{{ 'General_VisitsWith'|translate(ecommerceAbandonedCartsText) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: left;"></div>
|
||||
{% include "_sparklineFooter.twig" %}
|
||||
</div></div>
|
@ -0,0 +1,3 @@
|
||||
<h2 piwik-enriched-headline>{{ 'Goals_Products'|translate }}</h2>
|
||||
|
||||
{{ productsByDimension|raw }}
|
@ -0,0 +1,3 @@
|
||||
<h2 piwik-enriched-headline>{{ 'Ecommerce_Sales'|translate }}</h2>
|
||||
|
||||
{{ goalReportsByDimension|raw }}
|
Reference in New Issue
Block a user