diff --git a/Block/Piwik.php b/Block/Matomo.php
similarity index 77%
rename from Block/Piwik.php
rename to Block/Matomo.php
index a67b5fc..b632930 100644
--- a/Block/Piwik.php
+++ b/Block/Matomo.php
@@ -1,30 +1,31 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Block;
+namespace Chessio\Matomo\Block;
/**
- * Piwik page block
+ * Matomo page block
*
*/
-class Piwik extends \Magento\Framework\View\Element\Template
+class Matomo extends \Magento\Framework\View\Element\Template
{
/**
@@ -35,16 +36,16 @@ class Piwik extends \Magento\Framework\View\Element\Template
protected $_jsonEncoder;
/**
- * Piwik tracker model
+ * Matomo tracker model
*
- * @var \Henhed\Piwik\Model\Tracker $_tracker
+ * @var \Chessio\Matomo\Model\Tracker $_tracker
*/
protected $_tracker;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data
+ * @var \Chessio\Matomo\Helper\Data
*/
protected $_dataHelper = null;
@@ -53,15 +54,15 @@ class Piwik extends \Magento\Framework\View\Element\Template
*
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
- \Henhed\Piwik\Model\Tracker $tracker,
- \Henhed\Piwik\Helper\Data $dataHelper,
+ \Chessio\Matomo\Model\Tracker $tracker,
+ \Chessio\Matomo\Helper\Data $dataHelper,
array $data = []
) {
$this->_jsonEncoder = $jsonEncoder;
@@ -71,9 +72,9 @@ public function __construct(
}
/**
- * Get Piwik tracker actions
+ * Get Matomo tracker actions
*
- * @return \Henhed\Piwik\Model\Tracker
+ * @return \Chessio\Matomo\Model\Tracker
*/
public function getTracker()
{
@@ -90,7 +91,7 @@ protected function _prepareTracker()
$tracker = $this->getTracker();
$this->_eventManager->dispatch(
- 'piwik_track_page_view_before',
+ 'matomo_track_page_view_before',
['block' => $this, 'tracker' => $tracker]
);
@@ -99,7 +100,7 @@ protected function _prepareTracker()
}
$this->_eventManager->dispatch(
- 'piwik_track_page_view_after',
+ 'matomo_track_page_view_after',
['block' => $this, 'tracker' => $tracker]
);
}
@@ -120,7 +121,7 @@ public function getJsOptions()
}
/**
- * Get Piwik JS URL
+ * Get Matomo JS URL
*
* @return string
*/
@@ -130,7 +131,7 @@ public function getScriptUrl()
}
/**
- * Get Piwik tracker URL
+ * Get Matomo tracker URL
*
* @return string
*/
@@ -140,7 +141,7 @@ public function getTrackerUrl()
}
/**
- * Get Piwik site ID
+ * Get Matomo site ID
*
* @return int
*/
@@ -176,7 +177,7 @@ public function jsonEncode($data)
}
/**
- * Generate Piwik tracking script
+ * Generate Matomo tracking script
*
* @return string
*/
diff --git a/CustomerData/Checkout/CartPlugin.php b/CustomerData/Checkout/CartPlugin.php
index e1ebb8b..caafae5 100644
--- a/CustomerData/Checkout/CartPlugin.php
+++ b/CustomerData/Checkout/CartPlugin.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\CustomerData\Checkout;
+namespace Chessio\Matomo\CustomerData\Checkout;
/**
* Plugin for \Magento\Checkout\CustomerData\Cart
@@ -35,23 +36,23 @@ class CartPlugin
protected $_checkoutSession;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
/**
* Tracker helper
*
- * @var \Henhed\Piwik\Helper\Tracker $_trackerHelper
+ * @var \Chessio\Matomo\Helper\Tracker $_trackerHelper
*/
protected $_trackerHelper;
/**
* Tracker factory
*
- * @var \Henhed\Piwik\Model\TrackerFactory $_trackerFactory
+ * @var \Chessio\Matomo\Model\TrackerFactory $_trackerFactory
*/
protected $_trackerFactory;
@@ -59,15 +60,15 @@ class CartPlugin
* Constructor
*
* @param \Magento\Checkout\Model\Session\Proxy $checkoutSession
- * @param \Henhed\Piwik\Helper\Data $dataHelper
- * @param \Henhed\Piwik\Helper\Tracker $trackerHelper
- * @param \Henhed\Piwik\Model\TrackerFactory $trackerFactory
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Helper\Tracker $trackerHelper
+ * @param \Chessio\Matomo\Model\TrackerFactory $trackerFactory
*/
public function __construct(
\Magento\Checkout\Model\Session\Proxy $checkoutSession,
- \Henhed\Piwik\Helper\Data $dataHelper,
- \Henhed\Piwik\Helper\Tracker $trackerHelper,
- \Henhed\Piwik\Model\TrackerFactory $trackerFactory
+ \Chessio\Matomo\Helper\Data $dataHelper,
+ \Chessio\Matomo\Helper\Tracker $trackerHelper,
+ \Chessio\Matomo\Model\TrackerFactory $trackerFactory
) {
$this->_checkoutSession = $checkoutSession;
$this->_dataHelper = $dataHelper;
@@ -92,7 +93,7 @@ public function afterGetSectionData(
if ($quote->getId()) {
$tracker = $this->_trackerFactory->create();
$this->_trackerHelper->addQuote($quote, $tracker);
- $result['piwikActions'] = $tracker->toArray();
+ $result['matomoActions'] = $tracker->toArray();
}
}
return $result;
diff --git a/CustomerData/Customer/CustomerPlugin.php b/CustomerData/Customer/CustomerPlugin.php
index c7649cb..b8204dc 100644
--- a/CustomerData/Customer/CustomerPlugin.php
+++ b/CustomerData/Customer/CustomerPlugin.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\CustomerData\Customer;
+namespace Chessio\Matomo\CustomerData\Customer;
/**
* Plugin for \Magento\Customer\CustomerData\Customer
@@ -35,16 +36,16 @@ class CustomerPlugin
protected $_currentCustomer;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
/**
* User ID provider pool
*
- * @var \Henhed\Piwik\UserId\Provider\Pool $_uidProviderPool
+ * @var \Chessio\Matomo\UserId\Provider\Pool $_uidProviderPool
*/
protected $_uidProviderPool;
@@ -52,13 +53,13 @@ class CustomerPlugin
* Constructor
*
* @param \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer
- * @param \Henhed\Piwik\Helper\Data $dataHelper
- * @param \Henhed\Piwik\UserId\Provider\Pool $uidProviderPool
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\UserId\Provider\Pool $uidProviderPool
*/
public function __construct(
\Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
- \Henhed\Piwik\Helper\Data $dataHelper,
- \Henhed\Piwik\UserId\Provider\Pool $uidProviderPool
+ \Chessio\Matomo\Helper\Data $dataHelper,
+ \Chessio\Matomo\UserId\Provider\Pool $uidProviderPool
) {
$this->_currentCustomer = $currentCustomer;
$this->_dataHelper = $dataHelper;
@@ -66,9 +67,9 @@ public function __construct(
}
/**
- * Get configured Piwik User ID provider or NULL
+ * Get configured Matomo User ID provider or NULL
*
- * @return \Henhed\Piwik\UserId\Provider\ProviderInterface|null
+ * @return \Chessio\Matomo\UserId\Provider\ProviderInterface|null
*/
protected function _getUserIdProvider()
{
@@ -77,7 +78,7 @@ protected function _getUserIdProvider()
}
/**
- * Get Piwik User ID for current customer
+ * Get Matomo User ID for current customer
*
* @return string
*/
@@ -105,7 +106,7 @@ public function afterGetSectionData(
if ($this->_dataHelper->isTrackingEnabled()) {
$userId = $this->_getUserId();
if ($userId !== '') {
- $result['piwikUserId'] = $userId;
+ $result['matomoUserId'] = $userId;
}
}
return $result;
diff --git a/Helper/Data.php b/Helper/Data.php
index 6c30440..c747377 100644
--- a/Helper/Data.php
+++ b/Helper/Data.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Helper;
+namespace Chessio\Matomo\Helper;
use Magento\Store\Model\Store;
/**
- * Piwik data helper
+ * Matomo data helper
*
*/
class Data extends \Magento\Framework\App\Helper\AbstractHelper
@@ -31,6 +32,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
/**
* System config XML paths
+ * Prefix "piwik/" left for compatibility with Henhed_Piwik
*/
const XML_PATH_ENABLED = 'piwik/tracking/enabled';
const XML_PATH_HOSTNAME = 'piwik/tracking/hostname';
@@ -43,7 +45,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
const XML_PATH_UID_PROVIDER = 'piwik/tracking/uid_provider';
/**
- * Check if Piwik is enabled
+ * Check if Matomo is enabled
*
* @param null|string|bool|int|Store $store
* @return bool
@@ -60,7 +62,7 @@ public function isTrackingEnabled($store = null)
}
/**
- * Retrieve Piwik hostname
+ * Retrieve Matomo hostname
*
* @param null|string|bool|int|Store $store
* @return string
@@ -75,7 +77,7 @@ public function getHostname($store = null)
}
/**
- * Retrieve Piwik CDN hostname
+ * Retrieve Matomo CDN hostname
*
* @param null|string|bool|int|Store $store
* @return string
@@ -108,7 +110,7 @@ protected function _getBaseUrl($host, $secure = null)
}
/**
- * Retrieve Piwik base URL
+ * Retrieve Matomo base URL
*
* @param null|string|bool|int|Store $store
* @param null|bool $secure
@@ -120,7 +122,7 @@ public function getBaseUrl($store = null, $secure = null)
}
/**
- * Retrieve Piwik CDN URL
+ * Retrieve Matomo CDN URL
*
* @param null|string|bool|int|Store $store
* @param null|bool $secure
@@ -135,7 +137,7 @@ public function getCdnBaseUrl($store = null, $secure = null)
}
/**
- * Retrieve Piwik tracker JS script path
+ * Retrieve Matomo tracker JS script path
*
* @param null|string|bool|int|Store $store
* @return string
@@ -146,11 +148,11 @@ public function getJsScriptPath($store = null)
self::XML_PATH_JS_SCRIPT_PATH,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
- )), '/') ?: 'piwik.js';
+ )), '/') ?: 'matomo.js';
}
/**
- * Retrieve Piwik tracker JS script URL
+ * Retrieve Matomo tracker JS script URL
*
* @param null|string|bool|int|Store $store
* @param null|bool $secure
@@ -163,7 +165,7 @@ public function getJsScriptUrl($store = null, $secure = null)
}
/**
- * Retrieve Piwik tracker PHP script path
+ * Retrieve Matomo tracker PHP script path
*
* @param null|string|bool|int|Store $store
* @return string
@@ -174,11 +176,11 @@ public function getPhpScriptPath($store = null)
self::XML_PATH_PHP_SCRIPT_PATH,
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store
- )), '/') ?: 'piwik.php';
+ )), '/') ?: 'matomo.php';
}
/**
- * Retrieve Piwik tracker PHP script URL
+ * Retrieve Matomo tracker PHP script URL
*
* @param null|string|bool|int|Store $store
* @param null|bool $secure
@@ -191,7 +193,7 @@ public function getPhpScriptUrl($store = null, $secure = null)
}
/**
- * Retrieve Piwik site ID
+ * Retrieve Matomo site ID
*
* @param null|string|bool|int|Store $store
* @return int
@@ -206,7 +208,7 @@ public function getSiteId($store = null)
}
/**
- * Check if Piwik link tracking is enabled
+ * Check if Matomo link tracking is enabled
*
* @param null|string|bool|int|Store $store
* @return bool
@@ -221,7 +223,7 @@ public function isLinkTrackingEnabled($store = null)
}
/**
- * Retrieve Piwik link tracking delay in milliseconds
+ * Retrieve Matomo link tracking delay in milliseconds
*
* @param null|string|bool|int|Store $store
* @return int
@@ -236,7 +238,7 @@ public function getLinkTrackingDelay($store = null)
}
/**
- * Get provider code for Piwik user ID tracking
+ * Get provider code for Matomo user ID tracking
*
* @param null|string|bool|int|Store $store
* @return string
diff --git a/Helper/Tracker.php b/Helper/Tracker.php
index 9b3295f..2076a06 100644
--- a/Helper/Tracker.php
+++ b/Helper/Tracker.php
@@ -1,34 +1,35 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Helper;
+namespace Chessio\Matomo\Helper;
-use Henhed\Piwik\Model\Tracker as TrackerModel;
+use Chessio\Matomo\Model\Tracker as TrackerModel;
use Magento\Quote\Model\Quote;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Api\Data\OrderItemInterface;
/**
- * Piwik tracker helper
+ * Matomo tracker helper
*
- * @see http://piwik.org/docs/ecommerce-analytics/
+ * @see http://matomo.org/docs/ecommerce-analytics/
*/
class Tracker extends \Magento\Framework\App\Helper\AbstractHelper
{
@@ -37,8 +38,8 @@ class Tracker extends \Magento\Framework\App\Helper\AbstractHelper
* Push `addEcommerceItem' with quote item data to given tracker
*
* @param \Magento\Quote\Model\Quote\Item $item
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @return \Henhed\Piwik\Helper\Tracker
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @return \Chessio\Matomo\Helper\Tracker
*/
public function addQuoteItem(Quote\Item $item, TrackerModel $tracker)
{
@@ -58,8 +59,8 @@ public function addQuoteItem(Quote\Item $item, TrackerModel $tracker)
* Push `trackEcommerceCartUpdate' with quote data to given tracker
*
* @param \Magento\Quote\Model\Quote $quote
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @return \Henhed\Piwik\Helper\Tracker
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @return \Chessio\Matomo\Helper\Tracker
*/
public function addQuoteTotal(Quote $quote, TrackerModel $tracker)
{
@@ -71,8 +72,8 @@ public function addQuoteTotal(Quote $quote, TrackerModel $tracker)
* Push quote contents to given tracker
*
* @param \Magento\Quote\Model\Quote $quote
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @return \Henhed\Piwik\Helper\Tracker
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @return \Chessio\Matomo\Helper\Tracker
*/
public function addQuote(Quote $quote, TrackerModel $tracker)
{
@@ -87,27 +88,27 @@ public function addQuote(Quote $quote, TrackerModel $tracker)
* Push order contents to given tracker
*
* @param \Magento\Sales\Api\Data\OrderInterface[]|\Traversable $orders
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @return \Henhed\Piwik\Helper\Tracker
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @return \Chessio\Matomo\Helper\Tracker
*/
public function addOrders($orders, TrackerModel $tracker)
{
- $piwikItems = [];
- $piwikOrder = [];
+ $matomoItems = [];
+ $matomoOrder = [];
// Collect tracking data
foreach ($orders as $order) {
foreach ($order->getItems() as $item) {
if (!$item->getParentItemId()) {
- $this->_appendOrderItemData($item, $piwikItems);
+ $this->_appendOrderItemData($item, $matomoItems);
}
}
- $this->_appendOrderData($order, $piwikOrder);
+ $this->_appendOrderData($order, $matomoOrder);
}
// Push `addEcommerceItem'
- foreach ($piwikItems as $piwikItem) {
- list($sku, $name, $rowTotal, $qty) = $piwikItem;
+ foreach ($matomoItems as $matomoItem) {
+ list($sku, $name, $rowTotal, $qty) = $matomoItem;
$tracker->addEcommerceItem(
$sku,
@@ -121,9 +122,9 @@ public function addOrders($orders, TrackerModel $tracker)
}
// Push `trackEcommerceOrder'
- if (!empty($piwikOrder)) {
+ if (!empty($matomoOrder)) {
list($orderId, $grandTotal, $subTotal, $tax, $shipping, $discount)
- = $piwikOrder;
+ = $matomoOrder;
$tracker->trackEcommerceOrder(
$orderId,
@@ -152,7 +153,7 @@ protected function _appendOrderItemData(OrderItemInterface $item, &$data)
$price = (float) $item->getBasePriceInclTax();
$qty = (float) $item->getQtyOrdered();
- // Group order items by SKU since Piwik doesn't seem to handle multiple
+ // Group order items by SKU since Matomo doesn't seem to handle multiple
// `addEcommerceItem' with the same SKU.
if (!isset($data[$sku])) {
$data[$sku] = [$sku, $name, $price * $qty, $qty];
@@ -178,7 +179,7 @@ protected function _appendOrderData(OrderInterface $order, &$data)
$shipping = (float) $order->getBaseShippingInclTax();
$discount = abs((float) $order->getBaseDiscountAmount());
- // Aggregate all placed orders into one since Piwik seems to only
+ // Aggregate all placed orders into one since Matomo seems to only
// register one `trackEcommerceOrder' per request. (For multishipping)
if (empty($data)) {
$data = [
diff --git a/Model/Config/Source/UserId/Provider.php b/Model/Config/Source/UserId/Provider.php
index 424c2b1..a63e048 100644
--- a/Model/Config/Source/UserId/Provider.php
+++ b/Model/Config/Source/UserId/Provider.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Model\Config\Source\UserId;
+namespace Chessio\Matomo\Model\Config\Source\UserId;
/**
* User ID provider config source model
@@ -30,16 +31,16 @@ class Provider implements \Magento\Framework\Option\ArrayInterface
/**
* User ID provider pool
*
- * @var \Henhed\Piwik\UserId\Provider\Pool $_pool
+ * @var \Chessio\Matomo\UserId\Provider\Pool $_pool
*/
protected $_pool;
/**
* Constructor
*
- * @param \Henhed\Piwik\UserId\Provider\Pool $pool
+ * @param \Chessio\Matomo\UserId\Provider\Pool $pool
*/
- public function __construct(\Henhed\Piwik\UserId\Provider\Pool $pool)
+ public function __construct(\Chessio\Matomo\UserId\Provider\Pool $pool)
{
$this->_pool = $pool;
}
diff --git a/Model/Tracker.php b/Model/Tracker.php
index c3a43b4..ef504ae 100644
--- a/Model/Tracker.php
+++ b/Model/Tracker.php
@@ -1,27 +1,28 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Model;
+namespace Chessio\Matomo\Model;
/**
- * Piwik tracker model
+ * Matomo tracker model
*
* @method Tracker trackEvent(string $category, string $action,
* string $name = null, int $value = null)
@@ -79,7 +80,7 @@
* context menu or middle click.
*
* @method Tracker enableHeartBeatTimer(int $delayInSeconds)
- * Install a Heart beat timer that will regularly send requests to Piwik (every
+ * Install a Heart beat timer that will regularly send requests to Matomo (every
* delayInSeconds seconds) in order to better measure the time spent on the
* page. These requests will be sent only when the user is actively viewing the
* page (when the tab is active and in focus). These requests will not track
@@ -103,16 +104,16 @@
* Specify the website ID
*
* @method Tracker setApiUrl(string $apiUrl)
- * Specify the Piwik HTTP API URL endpoint. Points to the root directory of
- * piwik, e.g. http://piwik.example.org/ or https://example.org/piwik/. This
+ * Specify the Matomo HTTP API URL endpoint. Points to the root directory of
+ * matomo, e.g. http://matomo.example.org/ or https://example.org/matomo/. This
* function is only useful when the 'Overlay' report is not working. By default
* you do not need to use this function.
*
* @method Tracker setTrackerUrl(string $trackerUrl)
- * Specify the Piwik server URL.
+ * Specify the Matomo server URL.
*
* @method Tracker setDownloadClasses(string|array $downloadClasses)
- * Set classes to be treated as downloads (in addition to piwik_download)
+ * Set classes to be treated as downloads (in addition to matomo_download)
*
* @method Tracker setDownloadExtensions(string|array $downloadExtensions)
* Set list of file extensions to be recognized as downloads. Example: 'doc' or
@@ -127,10 +128,10 @@
* extensions. Example: 'doc' or ['doc', 'xls']
*
* @method Tracker setIgnoreClasses(string|array $ignoreClasses)
- * Set classes to be ignored if present in link (in addition to piwik_ignore)
+ * Set classes to be ignored if present in link (in addition to matomo_ignore)
*
* @method Tracker setLinkClasses(string|array $linkClasses)
- * Set classes to be treated as outlinks (in addition to piwik_link)
+ * Set classes to be treated as outlinks (in addition to matomo_link)
*
* @method Tracker setLinkTrackingTimer(int $linkTrackingTimer)
* Set delay for link tracking in milliseconds.
@@ -139,19 +140,19 @@
* Set to true to not record the hash tag (anchor) portion of URLs
*
* @method Tracker setGenerationTimeMs(int $generationTime)
- * By default Piwik uses the browser DOM Timing API to accurately determine the
+ * By default Matomo uses the browser DOM Timing API to accurately determine the
* time it takes to generate and download the page. You may overwrite the value
* by specifying a milliseconds value here.
*
* @method Tracker appendToTrackingUrl(string $appendToUrl)
- * Appends a custom string to the end of the HTTP request to piwik.php?
+ * Appends a custom string to the end of the HTTP request to matomo.php?
*
* @method Tracker setDoNotTrack(bool $flag)
* Set to true to not track users who opt out of tracking using Mozilla's
* (proposed) Do Not Track setting.
*
* @method Tracker disableCookies()
- * Disables all first party cookies. Existing Piwik cookies for this websites
+ * Disables all first party cookies. Existing Matomo cookies for this websites
* will be deleted on the next page view.
*
* @method Tracker deleteCookies()
@@ -190,10 +191,10 @@
*
* @method Tracker setCustomDimension(int $customDimensionId,
* string $customDimensionValue)
- * Set a custom dimension. (requires Piwik 2.15.1 + Custom Dimensions plugin)
+ * Set a custom dimension. (requires Matomo 2.15.1 + Custom Dimensions plugin)
*
* @method Tracker deleteCustomDimension(int customDimensionId)
- * Delete a custom dimension. (requires Piwik 2.15.1 + Custom Dimensions plugin)
+ * Delete a custom dimension. (requires Matomo 2.15.1 + Custom Dimensions plugin)
*
* @method Tracker setCampaignNameKey(string $name)
* Set campaign name parameter(s).
@@ -249,7 +250,7 @@
* @method Tracker setSessionCookieTimeout(int $seconds)
* The default is 30 minutes
*
- * @see http://developer.piwik.org/api-reference/tracking-javascript
+ * @see http://developer.matomo.org/api-reference/tracking-javascript
*/
class Tracker
{
@@ -257,24 +258,24 @@ class Tracker
/**
* Action items
*
- * @var \Henhed\Piwik\Model\Tracker\Action[] $_actions
+ * @var \Chessio\Matomo\Model\Tracker\Action[] $_actions
*/
protected $_actions = [];
/**
* Tracker action factory instance
*
- * @var \Henhed\Piwik\Model\Tracker\ActionFactory $_actionFactory
+ * @var \Chessio\Matomo\Model\Tracker\ActionFactory $_actionFactory
*/
protected $_actionFactory;
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker\ActionFactory $actionFactory
+ * @param \Chessio\Matomo\Model\Tracker\ActionFactory $actionFactory
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker\ActionFactory $actionFactory
+ \Chessio\Matomo\Model\Tracker\ActionFactory $actionFactory
) {
$this->_actionFactory = $actionFactory;
}
@@ -282,8 +283,8 @@ public function __construct(
/**
* Push an action to this tracker
*
- * @param \Henhed\Piwik\Model\Tracker\Action $action
- * @return \Henhed\Piwik\Model\Tracker
+ * @param \Chessio\Matomo\Model\Tracker\Action $action
+ * @return \Chessio\Matomo\Model\Tracker
*/
public function push(Tracker\Action $action)
{
@@ -294,7 +295,7 @@ public function push(Tracker\Action $action)
/**
* Get all actions in this tracker
*
- * @return \Henhed\Piwik\Model\Tracker\Action[]
+ * @return \Chessio\Matomo\Model\Tracker\Action[]
*/
public function getActions()
{
@@ -320,7 +321,7 @@ public function toArray()
*
* @param string $name
* @param array $arguments
- * @return \Henhed\Piwik\Model\Tracker
+ * @return \Chessio\Matomo\Model\Tracker
*/
public function __call($name, $arguments)
{
diff --git a/Model/Tracker/Action.php b/Model/Tracker/Action.php
index ec808dc..f4bcfde 100644
--- a/Model/Tracker/Action.php
+++ b/Model/Tracker/Action.php
@@ -1,27 +1,28 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Model\Tracker;
+namespace Chessio\Matomo\Model\Tracker;
/**
- * Piwik tracker action
+ * Matomo tracker action
*
*/
class Action
diff --git a/Observer/BeforeTrackPageViewObserver.php b/Observer/BeforeTrackPageViewObserver.php
index df77154..7812278 100644
--- a/Observer/BeforeTrackPageViewObserver.php
+++ b/Observer/BeforeTrackPageViewObserver.php
@@ -1,47 +1,48 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
/**
- * Observer for `piwik_track_page_view_before'
+ * Observer for `matomo_track_page_view_before'
*
*/
class BeforeTrackPageViewObserver implements ObserverInterface
{
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data
+ * @var \Chessio\Matomo\Helper\Data
*/
protected $_dataHelper;
/**
* Constructor
*
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
*/
- public function __construct(\Henhed\Piwik\Helper\Data $dataHelper)
+ public function __construct(\Chessio\Matomo\Helper\Data $dataHelper)
{
$this->_dataHelper = $dataHelper;
}
@@ -50,12 +51,12 @@ public function __construct(\Henhed\Piwik\Helper\Data $dataHelper)
* Push additional actions to tracker before `trackPageView' is added
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\BeforeTrackPageViewObserver
+ * @return \Chessio\Matomo\Observer\BeforeTrackPageViewObserver
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
$tracker = $observer->getEvent()->getTracker();
- /** @var \Henhed\Piwik\Model\Tracker $tracker */
+ /** @var \Chessio\Matomo\Model\Tracker $tracker */
$this->_pushLinkTracking($tracker);
@@ -65,10 +66,10 @@ public function execute(\Magento\Framework\Event\Observer $observer)
/**
* Push link tracking options to given tracker
*
- * @param \Henhed\Piwik\Model\Tracker $tracker
- * @return \Henhed\Piwik\Observer\BeforeTrackPageViewObserver
+ * @param \Chessio\Matomo\Model\Tracker $tracker
+ * @return \Chessio\Matomo\Observer\BeforeTrackPageViewObserver
*/
- protected function _pushLinkTracking(\Henhed\Piwik\Model\Tracker $tracker)
+ protected function _pushLinkTracking(\Chessio\Matomo\Model\Tracker $tracker)
{
if ($this->_dataHelper->isLinkTrackingEnabled()) {
$tracker->enableLinkTracking(true);
diff --git a/Observer/CartViewObserver.php b/Observer/CartViewObserver.php
index 9dae7ce..c4ea6a4 100644
--- a/Observer/CartViewObserver.php
+++ b/Observer/CartViewObserver.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
@@ -30,23 +31,23 @@ class CartViewObserver implements ObserverInterface
{
/**
- * Piwik tracker instance
+ * Matomo tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker
+ * @var \Chessio\Matomo\Model\Tracker
*/
- protected $_piwikTracker;
+ protected $_matomoTracker;
/**
* Tracker helper
*
- * @var \Henhed\Piwik\Helper\Tracker $_trackerHelper
+ * @var \Chessio\Matomo\Helper\Tracker $_trackerHelper
*/
protected $_trackerHelper;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
@@ -60,18 +61,18 @@ class CartViewObserver implements ObserverInterface
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker $piwikTracker
- * @param \Henhed\Piwik\Helper\Tracker $trackerHelper
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Model\Tracker $matomoTracker
+ * @param \Chessio\Matomo\Helper\Tracker $trackerHelper
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
* @param \Magento\Checkout\Model\Session\Proxy $checkoutSession
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker $piwikTracker,
- \Henhed\Piwik\Helper\Tracker $trackerHelper,
- \Henhed\Piwik\Helper\Data $dataHelper,
+ \Chessio\Matomo\Model\Tracker $matomoTracker,
+ \Chessio\Matomo\Helper\Tracker $trackerHelper,
+ \Chessio\Matomo\Helper\Data $dataHelper,
\Magento\Checkout\Model\Session\Proxy $checkoutSession
) {
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
$this->_trackerHelper = $trackerHelper;
$this->_dataHelper = $dataHelper;
$this->_checkoutSession = $checkoutSession;
@@ -81,7 +82,7 @@ public function __construct(
* Push trackEcommerceCartUpdate to tracker on cart view page
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\CartViewObserver
+ * @return \Chessio\Matomo\Observer\CartViewObserver
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function execute(\Magento\Framework\Event\Observer $observer)
@@ -89,7 +90,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
if ($this->_dataHelper->isTrackingEnabled()) {
$this->_trackerHelper->addQuote(
$this->_checkoutSession->getQuote(),
- $this->_piwikTracker
+ $this->_matomoTracker
);
}
return $this;
diff --git a/Observer/CategoryViewObserver.php b/Observer/CategoryViewObserver.php
index 6c388cf..7780627 100644
--- a/Observer/CategoryViewObserver.php
+++ b/Observer/CategoryViewObserver.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
@@ -30,30 +31,30 @@ class CategoryViewObserver implements ObserverInterface
{
/**
- * Piwik tracker instance
+ * Matomo tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker
+ * @var \Chessio\Matomo\Model\Tracker
*/
- protected $_piwikTracker;
+ protected $_matomoTracker;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker $piwikTracker
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Model\Tracker $matomoTracker
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker $piwikTracker,
- \Henhed\Piwik\Helper\Data $dataHelper
+ \Chessio\Matomo\Model\Tracker $matomoTracker,
+ \Chessio\Matomo\Helper\Data $dataHelper
) {
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
$this->_dataHelper = $dataHelper;
}
@@ -61,7 +62,7 @@ public function __construct(
* Push EcommerceView to tracker on category view page
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\CategoryViewObserver
+ * @return \Chessio\Matomo\Observer\CategoryViewObserver
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
@@ -72,7 +73,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
$category = $observer->getEvent()->getCategory();
/** @var \Magento\Catalog\Model\Category $category */
- $this->_piwikTracker->setEcommerceView(
+ $this->_matomoTracker->setEcommerceView(
false,
false,
$category->getName()
diff --git a/Observer/CheckoutSuccessObserver.php b/Observer/CheckoutSuccessObserver.php
index 18b55aa..f38a32d 100644
--- a/Observer/CheckoutSuccessObserver.php
+++ b/Observer/CheckoutSuccessObserver.php
@@ -1,53 +1,54 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
/**
* Observer for `controller_action_predispatch_checkout_cart_index'
*
- * @see http://piwik.org/docs/ecommerce-analytics/#tracking-ecommerce-orders-items-purchased-required
+ * @see https://matomo.org/docs/ecommerce-analytics/
*/
class CheckoutSuccessObserver implements ObserverInterface
{
/**
- * Piwik tracker instance
+ * Matomo tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker $_piwikTracker
+ * @var \Chessio\Matomo\Model\Tracker $_matomoTracker
*/
- protected $_piwikTracker;
+ protected $_matomoTracker;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
/**
- * Piwik tracker helper
+ * Matomo tracker helper
*
- * @var \Henhed\Piwik\Helper\Tracker $_trackerHelper
+ * @var \Chessio\Matomo\Helper\Tracker $_trackerHelper
*/
protected $_trackerHelper;
@@ -68,20 +69,20 @@ class CheckoutSuccessObserver implements ObserverInterface
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker $piwikTracker
- * @param \Henhed\Piwik\Helper\Data $dataHelper
- * @param \Henhed\Piwik\Helper\Tracker $trackerHelper
+ * @param \Chessio\Matomo\Model\Tracker $matomoTracker
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Helper\Tracker $trackerHelper
* @param \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
* @param \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker $piwikTracker,
- \Henhed\Piwik\Helper\Data $dataHelper,
- \Henhed\Piwik\Helper\Tracker $trackerHelper,
+ \Chessio\Matomo\Model\Tracker $matomoTracker,
+ \Chessio\Matomo\Helper\Data $dataHelper,
+ \Chessio\Matomo\Helper\Tracker $trackerHelper,
\Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
\Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder
) {
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
$this->_dataHelper = $dataHelper;
$this->_trackerHelper = $trackerHelper;
$this->_orderRepository = $orderRepository;
@@ -92,7 +93,7 @@ public function __construct(
* Push trackEcommerceOrder to tracker on checkout success page
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\CheckoutSuccessObserver
+ * @return \Chessio\Matomo\Observer\CheckoutSuccessObserver
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
@@ -111,7 +112,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
$this->_trackerHelper->addOrders(
$searchResult->getItems(),
- $this->_piwikTracker
+ $this->_matomoTracker
);
return $this;
diff --git a/Observer/ProductViewObserver.php b/Observer/ProductViewObserver.php
index 8fc50fd..e1b26b0 100644
--- a/Observer/ProductViewObserver.php
+++ b/Observer/ProductViewObserver.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
@@ -30,30 +31,30 @@ class ProductViewObserver implements ObserverInterface
{
/**
- * Piwik tracker instance
+ * Matomo tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker
+ * @var \Chessio\Matomo\Model\Tracker
*/
- protected $_piwikTracker;
+ protected $_matomoTracker;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker $piwikTracker
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Model\Tracker $matomoTracker
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker $piwikTracker,
- \Henhed\Piwik\Helper\Data $dataHelper
+ \Chessio\Matomo\Model\Tracker $matomoTracker,
+ \Chessio\Matomo\Helper\Data $dataHelper
) {
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
$this->_dataHelper = $dataHelper;
}
@@ -61,7 +62,7 @@ public function __construct(
* Push EcommerceView to tracker on product view page
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\ProductViewObserver
+ * @return \Chessio\Matomo\Observer\ProductViewObserver
*/
public function execute(\Magento\Framework\Event\Observer $observer)
{
@@ -73,7 +74,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
/** @var \Magento\Catalog\Model\Product $product */
$category = $product->getCategory();
- $this->_piwikTracker->setEcommerceView(
+ $this->_matomoTracker->setEcommerceView(
$product->getSku(),
$product->getName(),
$category
diff --git a/Observer/SearchResultObserver.php b/Observer/SearchResultObserver.php
index add4457..8e0b28f 100644
--- a/Observer/SearchResultObserver.php
+++ b/Observer/SearchResultObserver.php
@@ -1,46 +1,47 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Observer;
+namespace Chessio\Matomo\Observer;
use Magento\Framework\Event\ObserverInterface;
/**
* Observer for `controller_action_layout_render_before_catalogsearch_result_index'
*
- * @see http://developer.piwik.org/guides/tracking-javascript-guide#internal-search-tracking
+ * @see http://developer.matomo.org/guides/tracking-javascript-guide#internal-search-tracking
*/
class SearchResultObserver implements ObserverInterface
{
/**
- * Piwik tracker instance
+ * Matomo tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker
+ * @var \Chessio\Matomo\Model\Tracker
*/
- protected $_piwikTracker;
+ protected $_matomoTracker;
/**
- * Piwik data helper
+ * Matomo data helper
*
- * @var \Henhed\Piwik\Helper\Data $_dataHelper
+ * @var \Chessio\Matomo\Helper\Data $_dataHelper
*/
protected $_dataHelper;
@@ -61,18 +62,18 @@ class SearchResultObserver implements ObserverInterface
/**
* Constructor
*
- * @param \Henhed\Piwik\Model\Tracker $piwikTracker
- * @param \Henhed\Piwik\Helper\Data $dataHelper
+ * @param \Chessio\Matomo\Model\Tracker $matomoTracker
+ * @param \Chessio\Matomo\Helper\Data $dataHelper
* @param \Magento\Search\Model\QueryFactory $queryFactory
* @param \Magento\Framework\App\ViewInterface $view
*/
public function __construct(
- \Henhed\Piwik\Model\Tracker $piwikTracker,
- \Henhed\Piwik\Helper\Data $dataHelper,
+ \Chessio\Matomo\Model\Tracker $matomoTracker,
+ \Chessio\Matomo\Helper\Data $dataHelper,
\Magento\Search\Model\QueryFactory $queryFactory,
\Magento\Framework\App\ViewInterface $view
) {
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
$this->_dataHelper = $dataHelper;
$this->_queryFactory = $queryFactory;
$this->_view = $view;
@@ -82,7 +83,7 @@ public function __construct(
* Push `trackSiteSearch' to tracker on search result page
*
* @param \Magento\Framework\Event\Observer $observer
- * @return \Henhed\Piwik\Observer\SearchResultObserver
+ * @return \Chessio\Matomo\Observer\SearchResultObserver
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function execute(\Magento\Framework\Event\Observer $observer)
@@ -92,9 +93,9 @@ public function execute(\Magento\Framework\Event\Observer $observer)
}
$query = $this->_queryFactory->get();
- $piwikBlock = $this->_view->getLayout()->getBlock('piwik.tracker');
+ $matomoBlock = $this->_view->getLayout()->getBlock('matomo.tracker');
/** @var \Magento\Search\Model\Query $query */
- /** @var \Henhed\Piwik\Block\Piwik $piwikBlock */
+ /** @var \Chessio\Matomo\Block\Matomo $matomoBlock */
$keyword = $query->getQueryText();
$resultsCount = $query->getNumResults();
@@ -110,18 +111,18 @@ public function execute(\Magento\Framework\Event\Observer $observer)
}
if ($resultsCount === null) {
- $this->_piwikTracker->trackSiteSearch($keyword);
+ $this->_matomoTracker->trackSiteSearch($keyword);
} else {
- $this->_piwikTracker->trackSiteSearch(
+ $this->_matomoTracker->trackSiteSearch(
$keyword,
false,
(int) $resultsCount
);
}
- if ($piwikBlock) {
+ if ($matomoBlock) {
// Don't push `trackPageView' when `trackSiteSearch' is set
- $piwikBlock->setSkipTrackPageView(true);
+ $matomoBlock->setSkipTrackPageView(true);
}
return $this;
diff --git a/README.md b/README.md
index 1366db5..137247a 100644
--- a/README.md
+++ b/README.md
@@ -1,140 +1,81 @@
-[![Build Status](https://travis-ci.org/henkelund/magento2-henhed-piwik.svg?branch=master)](https://travis-ci.org/henkelund/magento2-henhed-piwik)
+# Matomo Integration for Magento 2
-Henhed_Piwik
-============
+*Chessio_Matomo* is a [Matomo](https://matomo.org/) web analytics module for the [Magento 2](https://magento.com/) eCommerce platform. Matomo is an extensible free/libre analytics tool that can be self-hosted, giving you complete data ownership. Chessio_Matomo lets you integrate Matomo with your Magento 2 store front. It is a fork of [*Henhed_Piwik*](https://github.com/henkelund/magento2-henhed-piwik).
-*Henhed_Piwik* is a [Piwik][piwik] web analytics module for the
-[Magento 2][magento] eCommerce platform. Piwik is an extensible
-free/libre analytics tool that can be self-hosted, giving you complete
-data ownership. Henhed_Piwik lets you integrate Piwik with your
-Magento 2 store front.
+## Installation
-
-Installation
-------------
-
-To install Henhed_Piwik, download and extract the
-[master zip archive][download] and move the extracted folder to
-*app/code/Henhed/Piwik* in your Magento 2 installation directory.
+To install Chessio_Matomo, download and extract the [main zip archive](https://github.com/fnogatz/magento2-matomo/archive/main.zip) and move the extracted folder to *app/code/Chessio/Matomo* in your Magento 2 installation directory.
```sh
-unzip magento2-henhed-piwik-master.zip
-mkdir app/code/Henhed
-mv magento2-henhed-piwik-master app/code/Henhed/Piwik
+unzip magento2-matomo-main.zip
+mkdir app/code/Chessio
+mv magento2-matomo-main app/code/Chessio/Matomo
```
-Alternatively, you can clone the Henhed_Piwik Git repository into
-*app/code/Henhed/Piwik*.
+Alternatively, you can clone the Chessio_Matomo Git repository into *app/code/Chessio_Matomo*.
```sh
-git clone https://github.com/henkelund/magento2-henhed-piwik.git app/code/Henhed/Piwik
+git clone https://github.com/fnogatz/magento2-matomo.git app/code/Chessio/Matomo
```
-Or, if you prefer, install it using [Composer][composer].
+Or, if you prefer, install it using [Composer](https://getcomposer.org/).
```sh
-composer require henhed/module-piwik
+composer require chessio/module-matomo
```
Finally, enable the module with the Magento CLI tool.
```sh
-php bin/magento module:enable Henhed_Piwik --clear-static-content
+php bin/magento module:enable Chessio_Matomo --clear-static-content
```
-NOTE: If you're using a Magento version prior to 2.2 you'll need to stick to the
-1.x releases of Henhed_Piwik. For manual installation, check out the
-[Release archive][releases]. For installation using Composer, you can use the
-*tilde* or *caret* version constraint operators (e.g. `~1.3` or `^1.3.1`).
-
-
-Configuration
--------------
+NOTE: If you're using a Magento version prior to 2.2 you'll need to stick to the 1.x releases of the original [Henhed_Piwik](https://github.com/henkelund/magento2-henhed-piwik#installation).
-Once intsalled, configuration options can be found in the Magento 2
-administration panel under *Stores/Configuration/Sales/Piwik API*.
-To start tracking, set *Enable Tracking* to *Yes*, enter the
-*Hostname* of your Piwik installation and click *Save Config*. If you
-have multiple websites in the same Piwik installation, make sure the
-*Site ID* configured in Magento is correct.
+## Configuration
+Once installed, configuration options can be found in the Magento 2 administration panel under *Stores/Configuration/Sales/Matomo API*.
+To start tracking, set *Enable Tracking* to *Yes*, enter the *Hostname* of your Matomo installation and click *Save Config*. If you have multiple websites in the same Matomo installation, make sure the *Site ID* configured in Magento is correct.
-Customization
--------------
+## Customization
-If you need to send some custom information to your Piwik server, Henhed_Piwik
-lets you do so using event observers.
+If you need to send some custom information to your Matomo server, Chessio_Matomo lets you do so using event observers.
-To set custom data on each page, use the `piwik_track_page_view_before` event.
-A tracker instance will be passed along with the event object to your observer's
-`execute` method.
+To set custom data on each page, use the `matomo_track_page_view_before` event. A tracker instance will be passed along with the event object to your observer's `execute` method.
```php
public function execute(\Magento\Framework\Event\Observer $observer)
{
$tracker = $observer->getEvent()->getTracker();
- /** @var \Henhed\Piwik\Model\Tracker $tracker */
+ /** @var \Chessio\Matomo\Model\Tracker $tracker */
$tracker->setDocumentTitle('My Custom Title');
}
```
-If you only want to add data under some specific circumstance, find a suitable
-event and request the tracker singleton in your observer's constructor. Store
-the tracker in a class member variable for later use in the `execute` method.
+If you only want to add data under some specific circumstance, find a suitable event and request the tracker singleton in your observer's constructor. Store the tracker in a class member variable for later use in the `execute` method.
```php
-public function __construct(\Henhed\Piwik\Model\Tracker $piwikTracker)
+public function __construct(\Chessio\Matomo\Model\Tracker $matomoTracker)
{
- $this->_piwikTracker = $piwikTracker;
+ $this->_matomoTracker = $matomoTracker;
}
```
-Beware of tracking user specific information on the server side as it will most
-likely cause caching problems. Instead, use Javascript to retrieve the user data
-from a cookie, localStorage or some Ajax request and then push the data to Piwik
-using either the Henhed_Piwik JS component ..
+Beware of tracking user specific information on the server side as it will most likely cause caching problems. Instead, use Javascript to retrieve the user data from a cookie, localStorage or some Ajax request and then push the data to Matomo using either the Chessio_Matomo JS component...
```js
-require(['Henhed_Piwik/js/tracker'], function (trackerComponent) {
+require(['Chessio_Matomo/js/tracker'], function (trackerComponent) {
trackerComponent.getTracker().done(function (tracker) {
// Do something with tracker
});
});
```
-.. or the vanilla Piwik approach.
+... or the vanilla Matomo approach:
```js
var _paq = _paq || [];
_paq.push(['setDocumentTitle', 'My Custom Title']);
```
-See the [Piwik Developer Docs][piwik-tracking-api] or the
-[\Henhed\Piwik\Model\Tracker][henhed-piwik-tracker] source code for a list of
-all methods available in the Tracking API.
-
-
-Disclaimer
-----------
-
-Henhed_Piwik is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU
-Affero General Public License][agpl] for more details.
-
-[agpl]: http://www.gnu.org/licenses/agpl.html
- "GNU Affero General Public License"
-[composer]: https://getcomposer.org/
- "Dependency Manager for PHP"
-[download]: https://github.com/henkelund/magento2-henhed-piwik/archive/master.zip
- "magento2-henhed-piwik-master"
-[henhed-piwik-tracker]: https://github.com/henkelund/magento2-henhed-piwik/blob/master/Model/Tracker.php
- "Model/Tracker.php at master"
-[magento]: https://magento.com/
- "eCommerce Software & eCommerce Platform Solutions"
-[piwik]: http://piwik.org/
- "Free Web Analytics Software"
-[piwik-tracking-api]: http://developer.piwik.org/api-reference/tracking-javascript
- "JavaScript Tracking Client"
-[releases]: https://github.com/henkelund/magento2-henhed-piwik/releases
- "Henhed_Piwik Releases"
+See the [Matomo Developer Docs](https://developer.matomo.org/api-reference/tracking-javascript) or the [\Chessio\Matomo\Model\Tracker](https://github.com/fnogatz/magento2-matomo/blob/main/Model/Tracker.php) source code for a list of all methods available in the Tracking API.
diff --git a/Test/Unit/CustomerData/Checkout/CartPluginTest.php b/Test/Unit/CustomerData/Checkout/CartPluginTest.php
index 33db40a..f5312e3 100644
--- a/Test/Unit/CustomerData/Checkout/CartPluginTest.php
+++ b/Test/Unit/CustomerData/Checkout/CartPluginTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\CustomerData\Checkout;
+namespace Chessio\Matomo\Test\Unit\CustomerData\Checkout;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\CustomerData\Checkout\CartPlugin
+ * Test for \Chessio\Matomo\CustomerData\Checkout\CartPlugin
*
*/
class CartPluginTest extends \PHPUnit\Framework\TestCase
@@ -32,7 +33,7 @@ class CartPluginTest extends \PHPUnit\Framework\TestCase
/**
* Customer data checkout cart plugin (test subject) instance
*
- * @var \Henhed\Piwik\CustomerData\Checkout\CartPlugin $_cartPlugin
+ * @var \Chessio\Matomo\CustomerData\Checkout\CartPlugin $_cartPlugin
*/
protected $_cartPlugin;
@@ -51,7 +52,7 @@ class CartPluginTest extends \PHPUnit\Framework\TestCase
protected $_quoteMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
@@ -78,7 +79,7 @@ class CartPluginTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\CustomerData\Checkout\CartPlugin::class;
+ $className = \Chessio\Matomo\CustomerData\Checkout\CartPlugin::class;
$objectManager = new ObjectManager($this);
$sessionProxyClass = \Magento\Checkout\Model\Session\Proxy::class;
$arguments = $objectManager->getConstructArguments($className, [
@@ -87,7 +88,7 @@ public function setUp()
->setMethods(['getQuote'])
->getMock(),
'trackerFactory' => $this->createPartialMock(
- \Henhed\Piwik\Model\TrackerFactory::class,
+ \Chessio\Matomo\Model\TrackerFactory::class,
['create']
)
]);
@@ -104,7 +105,7 @@ public function setUp()
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_trackerMock = $this->createMock(
- \Henhed\Piwik\Model\Tracker::class
+ \Chessio\Matomo\Model\Tracker::class
);
$arguments['trackerFactory']
->expects($this->any())
@@ -119,14 +120,14 @@ public function setUp()
}
/**
- * Test \Henhed\Piwik\CustomerData\Checkout\CartPlugin::afterGetSectionData
+ * Test \Chessio\Matomo\CustomerData\Checkout\CartPlugin::afterGetSectionData
* with existing quote.
*
* @return void
*/
public function testafterGetSectionData()
{
- $expectedResult = ['piwikActions' => ['someKey' => 'someValue']];
+ $expectedResult = ['matomoActions' => ['someKey' => 'someValue']];
// Enable tracking
$this->_dataHelperMock
@@ -151,7 +152,7 @@ public function testafterGetSectionData()
$this->_trackerMock
->expects($this->once())
->method('toArray')
- ->willReturn($expectedResult['piwikActions']);
+ ->willReturn($expectedResult['matomoActions']);
// Assert that result of plugin equals expected result
$this->assertEquals(
@@ -161,7 +162,7 @@ public function testafterGetSectionData()
}
/**
- * Test \Henhed\Piwik\CustomerData\Checkout\CartPlugin::afterGetSectionData
+ * Test \Chessio\Matomo\CustomerData\Checkout\CartPlugin::afterGetSectionData
* with empty quote.
*
* @return void
@@ -191,7 +192,7 @@ public function testafterGetSectionDataWithEmptyQuote()
}
/**
- * Test \Henhed\Piwik\CustomerData\Checkout\CartPlugin::afterGetSectionData
+ * Test \Chessio\Matomo\CustomerData\Checkout\CartPlugin::afterGetSectionData
* with tracking disabled.
*
* @return void
diff --git a/Test/Unit/CustomerData/Customer/CustomerPluginTest.php b/Test/Unit/CustomerData/Customer/CustomerPluginTest.php
index 1a20250..bb990c0 100644
--- a/Test/Unit/CustomerData/Customer/CustomerPluginTest.php
+++ b/Test/Unit/CustomerData/Customer/CustomerPluginTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\CustomerData\Customer;
+namespace Chessio\Matomo\Test\Unit\CustomerData\Customer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\CustomerData\Customer\CustomerPlugin
+ * Test for \Chessio\Matomo\CustomerData\Customer\CustomerPlugin
*
*/
class CustomerPluginTest extends \PHPUnit\Framework\TestCase
@@ -32,7 +33,7 @@ class CustomerPluginTest extends \PHPUnit\Framework\TestCase
/**
* Customer data plugin (test subject) instance
*
- * @var \Henhed\Piwik\CustomerData\Customer\CustomerPlugin $_customerPlugin
+ * @var \Chessio\Matomo\CustomerData\Customer\CustomerPlugin $_customerPlugin
*/
protected $_customerPlugin;
@@ -44,21 +45,21 @@ class CustomerPluginTest extends \PHPUnit\Framework\TestCase
protected $_currentCustomerMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
protected $_dataHelperMock;
/**
- * Piwik user ID provider pool mock object
+ * Matomo user ID provider pool mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_uidProviderPoolMock
*/
protected $_uidProviderPoolMock;
/**
- * Piwik user ID provider mock object
+ * Matomo user ID provider mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_uidProviderMock
*/
@@ -78,7 +79,7 @@ class CustomerPluginTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\CustomerData\Customer\CustomerPlugin::class;
+ $className = \Chessio\Matomo\CustomerData\Customer\CustomerPlugin::class;
$objectManager = new ObjectManager($this);
$args = $objectManager->getConstructArguments($className);
$this->_customerPlugin = $objectManager->getObject($className, $args);
@@ -86,7 +87,7 @@ public function setUp()
$this->_dataHelperMock = $args['dataHelper'];
$this->_uidProviderPoolMock = $args['uidProviderPool'];
$this->_uidProviderMock = $this->createPartialMock(
- \Henhed\Piwik\UserId\Provider\ProviderInterface::class,
+ \Chessio\Matomo\UserId\Provider\ProviderInterface::class,
['getUserId', 'getTitle']
);
$this->_customerDataMock = $this->createMock(
@@ -128,7 +129,7 @@ public function testafterGetSectionData(
) {
$expectedResult = [];
if ($enabled && $customerId && $provider && $userId) {
- $expectedResult['piwikUserId'] = $userId;
+ $expectedResult['matomoUserId'] = $userId;
}
$this->_dataHelperMock
diff --git a/Test/Unit/Helper/DataTest.php b/Test/Unit/Helper/DataTest.php
index a8e53e8..c1c3f84 100644
--- a/Test/Unit/Helper/DataTest.php
+++ b/Test/Unit/Helper/DataTest.php
@@ -1,39 +1,40 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Helper;
+namespace Chessio\Matomo\Test\Unit\Helper;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Store\Model\ScopeInterface;
/**
- * Test for \Henhed\Piwik\Helper\Data
+ * Test for \Chessio\Matomo\Helper\Data
*
*/
class DataTest extends \PHPUnit\Framework\TestCase
{
/**
- * Piwik data helper (test subject) instance
+ * Matomo data helper (test subject) instance
*
- * @var \Henhed\Piwik\Helper\Data $_helper
+ * @var \Chessio\Matomo\Helper\Data $_helper
*/
protected $_helper;
@@ -58,7 +59,7 @@ class DataTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Helper\Data::class;
+ $className = \Chessio\Matomo\Helper\Data::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className);
$this->_helper = $objectManager->getObject($className, $arguments);
@@ -99,11 +100,11 @@ protected function _prepareScopeConfigMock(
->method('isSetFlag')
->will($this->returnValueMap([
[
- \Henhed\Piwik\Helper\Data::XML_PATH_ENABLED,
+ \Chessio\Matomo\Helper\Data::XML_PATH_ENABLED,
$scope, $store, $enabled
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_LINK_ENABLED,
+ \Chessio\Matomo\Helper\Data::XML_PATH_LINK_ENABLED,
$scope, $store, $linkEnabled
]
]));
@@ -113,27 +114,27 @@ protected function _prepareScopeConfigMock(
->method('getValue')
->will($this->returnValueMap([
[
- \Henhed\Piwik\Helper\Data::XML_PATH_HOSTNAME,
+ \Chessio\Matomo\Helper\Data::XML_PATH_HOSTNAME,
$scope, $store, $hostname
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_SITE_ID,
+ \Chessio\Matomo\Helper\Data::XML_PATH_SITE_ID,
$scope, $store, $siteId
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_LINK_DELAY,
+ \Chessio\Matomo\Helper\Data::XML_PATH_LINK_DELAY,
$scope, $store, $linkDelay
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_PHP_SCRIPT_PATH,
+ \Chessio\Matomo\Helper\Data::XML_PATH_PHP_SCRIPT_PATH,
$scope, $store, $phpScriptPath
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_JS_SCRIPT_PATH,
+ \Chessio\Matomo\Helper\Data::XML_PATH_JS_SCRIPT_PATH,
$scope, $store, $jsScriptPath
],
[
- \Henhed\Piwik\Helper\Data::XML_PATH_CDN_HOSTNAME,
+ \Chessio\Matomo\Helper\Data::XML_PATH_CDN_HOSTNAME,
$scope, $store, $cdnHostname
]
]));
@@ -147,16 +148,16 @@ protected function _prepareScopeConfigMock(
public function isTrackingEnabledDataProvider()
{
return [
- [true, 'piwik.example.org', 1, true],
+ [true, 'matomo.example.org', 1, true],
[true, '', 1, false],
[true, ' ', 1, false],
- [true, 'example.org/piwik', 0, false],
- [false, 'piwik.org', 1, false]
+ [true, 'example.org/matomo', 0, false],
+ [false, 'matomo.org', 1, false]
];
}
/**
- * Test \Henhed\Piwik\Helper\Data::isTrackingEnabled
+ * Test \Chessio\Matomo\Helper\Data::isTrackingEnabled
*
* Also covers `getHostname' and `getSiteId'
*
@@ -186,31 +187,31 @@ public function phpScriptUrlDataProvider()
{
return [
[
- 'piwik.org',
+ 'matomo.org',
false, // should prepend `http://'
- null, // should fall back on `piwik.php'
+ null, // should fall back on `matomo.php'
// Expected result
- 'http://piwik.org/piwik.php'
+ 'http://matomo.org/matomo.php'
],
[
- 'example.com/piwik',
+ 'example.com/matomo',
true, // should prepend `https://'
- 'tracker.php', // should override `piwik.php'
+ 'tracker.php', // should override `matomo.php'
// Expected result
- 'https://example.com/piwik/tracker.php'
+ 'https://example.com/matomo/tracker.php'
],
[
' https://example.com/ ', // should be trimmed
false, // should replace `https://' with `http://'
- ' /piwik/tracker.php ', // should be trimmed
+ ' /matomo/tracker.php ', // should be trimmed
// Expected result
- 'http://example.com/piwik/tracker.php'
+ 'http://example.com/matomo/tracker.php'
]
];
}
/**
- * Test \Henhed\Piwik\Helper\Data::getPhpScriptUrl
+ * Test \Chessio\Matomo\Helper\Data::getPhpScriptUrl
*
* @param string $hostname
* @param bool $isSecure
@@ -257,23 +258,23 @@ public function jsScriptUrlDataProvider()
{
return [
[
- 'piwik.org',
+ 'matomo.org',
false, // should prepend `http://'
- null, // should fall back on `piwik.js'
+ null, // should fall back on `matomo.js'
null, // should fall back on regular hostname
// Expected result
- 'http://piwik.org/piwik.js'
+ 'http://matomo.org/matomo.js'
],
[
- ' piwik.org/path/ ', // should be trimmed
+ ' matomo.org/path/ ', // should be trimmed
true, // should prepend `https://'
- 'example.js', // should override `piwik.js'
+ 'example.js', // should override `matomo.js'
null, // should fall back on hostname
// Expected result
- 'https://piwik.org/path/example.js'
+ 'https://matomo.org/path/example.js'
],
[
- 'piwik.org', // should be ignored
+ 'matomo.org', // should be ignored
true, // should replace `http://' with `https://''
' /to/tracker.js ', // should be trimmed
'http://cdn.example.com/path/', // should override hostname
@@ -284,7 +285,7 @@ public function jsScriptUrlDataProvider()
}
/**
- * Test \Henhed\Piwik\Helper\Data::getJsScriptUrl
+ * Test \Chessio\Matomo\Helper\Data::getJsScriptUrl
*
* @param string $hostname
* @param bool $isSecure
@@ -334,17 +335,17 @@ public function testGetJsScriptUrl(
public function isLinkTrackingEnabledDataProvider()
{
return [
- [true, true, 'piwik.example.org', 1, true],
- [false, true, 'piwik.example.org', 2, false],
+ [true, true, 'matomo.example.org', 1, true],
+ [false, true, 'matomo.example.org', 2, false],
[true, true, '', 1, false],
[true, true, ' ', 1, false],
- [false, true, 'example.org/piwik', 0, false],
- [true, false, 'piwik.org', 1, false]
+ [false, true, 'example.org/matomo', 0, false],
+ [true, false, 'matomo.org', 1, false]
];
}
/**
- * Test \Henhed\Piwik\Helper\Data::isLinkTrackingEnabled
+ * Test \Chessio\Matomo\Helper\Data::isLinkTrackingEnabled
*
* Also covers `isTrackingEnabled'
*
diff --git a/Test/Unit/Helper/TrackerTest.php b/Test/Unit/Helper/TrackerTest.php
index b4be4b3..6b38c59 100644
--- a/Test/Unit/Helper/TrackerTest.php
+++ b/Test/Unit/Helper/TrackerTest.php
@@ -1,45 +1,46 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Helper;
+namespace Chessio\Matomo\Test\Unit\Helper;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Helper\Tracker
+ * Test for \Chessio\Matomo\Helper\Tracker
*
*/
class TrackerTest extends \PHPUnit\Framework\TestCase
{
/**
- * Piwik tracker helper (test subject) instance
+ * Matomo tracker helper (test subject) instance
*
- * @var \Henhed\Piwik\Helper\Tracker $_helper
+ * @var \Chessio\Matomo\Helper\Tracker $_helper
*/
protected $_helper;
/**
* Tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker $_tracker
+ * @var \Chessio\Matomo\Model\Tracker $_tracker
*/
protected $_tracker;
@@ -54,14 +55,14 @@ public function setUp()
// Create test subject
$this->_helper = $objectManager->getObject(
- \Henhed\Piwik\Helper\Tracker::class
+ \Chessio\Matomo\Helper\Tracker::class
);
// Create tracker instance
- $class = \Henhed\Piwik\Model\Tracker::class;
+ $class = \Chessio\Matomo\Model\Tracker::class;
$arguments = $objectManager->getConstructArguments($class, [
'actionFactory' => $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker\ActionFactory::class,
+ \Chessio\Matomo\Model\Tracker\ActionFactory::class,
['create']
)
]);
@@ -69,7 +70,7 @@ public function setUp()
->expects($this->any())
->method('create')
->willReturnCallback(function ($data) {
- return new \Henhed\Piwik\Model\Tracker\Action(
+ return new \Chessio\Matomo\Model\Tracker\Action(
$data['name'],
$data['args']
);
@@ -104,7 +105,7 @@ public function addQuoteDataProvider()
}
/**
- * Test for \Henhed\Piwik\Helper\Tracker::addQuote
+ * Test for \Chessio\Matomo\Helper\Tracker::addQuote
*
* Also covers `addQuoteItem' and `addQuoteTotal'
*
@@ -200,7 +201,7 @@ public function addOrdersDataProvider()
}
/**
- * Test for \Henhed\Piwik\Helper\Tracker::addOrders
+ * Test for \Chessio\Matomo\Helper\Tracker::addOrders
*
* @param array $ordersData
* @param array $expectedResult
diff --git a/Test/Unit/Model/TrackerTest.php b/Test/Unit/Model/TrackerTest.php
index e6dba1e..7b8881d 100644
--- a/Test/Unit/Model/TrackerTest.php
+++ b/Test/Unit/Model/TrackerTest.php
@@ -1,30 +1,31 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Model;
+namespace Chessio\Matomo\Test\Unit\Model;
-use \Henhed\Piwik\Model\Tracker;
+use \Chessio\Matomo\Model\Tracker;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Model\Tracker
+ * Test for \Chessio\Matomo\Model\Tracker
*
*/
class TrackerTest extends \PHPUnit\Framework\TestCase
@@ -33,7 +34,7 @@ class TrackerTest extends \PHPUnit\Framework\TestCase
/**
* Tracker instance
*
- * @var \Henhed\Piwik\Model\Tracker $_tracker
+ * @var \Chessio\Matomo\Model\Tracker $_tracker
*/
protected $_tracker;
@@ -51,11 +52,11 @@ class TrackerTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Model\Tracker::class;
+ $className = \Chessio\Matomo\Model\Tracker::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className, [
'actionFactory' => $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker\ActionFactory::class,
+ \Chessio\Matomo\Model\Tracker\ActionFactory::class,
['create']
)
]);
diff --git a/Test/Unit/Observer/BeforeTrackPageViewObserverTest.php b/Test/Unit/Observer/BeforeTrackPageViewObserverTest.php
index 8178d97..1b0c583 100644
--- a/Test/Unit/Observer/BeforeTrackPageViewObserverTest.php
+++ b/Test/Unit/Observer/BeforeTrackPageViewObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\BeforeTrackPageViewObserver
+ * Test for \Chessio\Matomo\Observer\BeforeTrackPageViewObserver
*
*/
class BeforeTrackPageViewObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,19 +33,19 @@ class BeforeTrackPageViewObserverTest extends \PHPUnit\Framework\TestCase
/**
* Before track page view observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\BeforeTrackPageViewObserver $_observer
+ * @var \Chessio\Matomo\Observer\BeforeTrackPageViewObserver $_observer
*/
protected $_observer;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
protected $_dataHelperMock;
/**
- * Piwik tracker mock object
+ * Matomo tracker mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_trackerMock
*/
@@ -71,13 +72,13 @@ class BeforeTrackPageViewObserverTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Observer\BeforeTrackPageViewObserver::class;
+ $className = \Chessio\Matomo\Observer\BeforeTrackPageViewObserver::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className);
$this->_observer = $objectManager->getObject($className, $arguments);
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_trackerMock = $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker::class,
+ \Chessio\Matomo\Model\Tracker::class,
['enableLinkTracking', 'setLinkTrackingTimer']
);
$this->_eventMock = $this->createPartialMock(
@@ -106,7 +107,7 @@ public function executeDataProvider()
}
/**
- * Test for \Henhed\Piwik\Observer\BeforeTrackPageViewObserver::execute
+ * Test for \Chessio\Matomo\Observer\BeforeTrackPageViewObserver::execute
*
* @param bool $linkTrackingEnabled
* @param int $linkTrackingDelay
diff --git a/Test/Unit/Observer/CartViewObserverTest.php b/Test/Unit/Observer/CartViewObserverTest.php
index 0fd635b..3427b15 100644
--- a/Test/Unit/Observer/CartViewObserverTest.php
+++ b/Test/Unit/Observer/CartViewObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\CartViewObserver
+ * Test for \Chessio\Matomo\Observer\CartViewObserver
*
*/
class CartViewObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,7 +33,7 @@ class CartViewObserverTest extends \PHPUnit\Framework\TestCase
/**
* Cart view observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\CartViewObserver
+ * @var \Chessio\Matomo\Observer\CartViewObserver
*/
protected $_observer;
@@ -58,7 +59,7 @@ class CartViewObserverTest extends \PHPUnit\Framework\TestCase
protected $_trackerHelperMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
@@ -85,7 +86,7 @@ class CartViewObserverTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Observer\CartViewObserver::class;
+ $className = \Chessio\Matomo\Observer\CartViewObserver::class;
$objectManager = new ObjectManager($this);
$sessionProxyClass = \Magento\Checkout\Model\Session\Proxy::class;
$arguments = $objectManager->getConstructArguments($className, [
@@ -95,7 +96,7 @@ public function setUp()
->getMock()
]);
$this->_observer = $objectManager->getObject($className, $arguments);
- $this->_trackerMock = $arguments['piwikTracker'];
+ $this->_trackerMock = $arguments['matomoTracker'];
$this->_trackerHelperMock = $arguments['trackerHelper'];
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_checkoutSessionMock = $arguments['checkoutSession'];
@@ -108,7 +109,7 @@ public function setUp()
}
/**
- * Test for \Henhed\Piwik\Observer\CartViewObserver::execute where
+ * Test for \Chessio\Matomo\Observer\CartViewObserver::execute where
* tracking is enabled.
*
* @return void
@@ -129,7 +130,7 @@ public function testExecuteWithTrackingEnabled()
// Make sure the tracker helpers `addQuote' is called exactly once with
// provided quote and tracker. Actual behavior of `addQuote' is covered
- // by \Henhed\Piwik\Test\Unit\Helper\TrackerTest.
+ // by \Chessio\Matomo\Test\Unit\Helper\TrackerTest.
$this->_trackerHelperMock
->expects($this->once())
->method('addQuote')
@@ -144,7 +145,7 @@ public function testExecuteWithTrackingEnabled()
}
/**
- * Test for \Henhed\Piwik\Observer\CartViewObserver::execute where
+ * Test for \Chessio\Matomo\Observer\CartViewObserver::execute where
* tracking is disabled.
*
* @return void
diff --git a/Test/Unit/Observer/CategoryViewObserverTest.php b/Test/Unit/Observer/CategoryViewObserverTest.php
index 0bf1993..3b81ecf 100644
--- a/Test/Unit/Observer/CategoryViewObserverTest.php
+++ b/Test/Unit/Observer/CategoryViewObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\CategoryViewObserver
+ * Test for \Chessio\Matomo\Observer\CategoryViewObserver
*
*/
class CategoryViewObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,19 +33,19 @@ class CategoryViewObserverTest extends \PHPUnit\Framework\TestCase
/**
* Category view observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\CategoryViewObserver $_observer
+ * @var \Chessio\Matomo\Observer\CategoryViewObserver $_observer
*/
protected $_observer;
/**
- * Piwik tracker mock object
+ * Matomo tracker mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_trackerMock
*/
protected $_trackerMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
@@ -78,14 +79,14 @@ class CategoryViewObserverTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Observer\CategoryViewObserver::class;
+ $className = \Chessio\Matomo\Observer\CategoryViewObserver::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className);
$this->_trackerMock = $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker::class,
+ \Chessio\Matomo\Model\Tracker::class,
['setEcommerceView']
);
- $arguments['piwikTracker'] = $this->_trackerMock;
+ $arguments['matomoTracker'] = $this->_trackerMock;
$this->_observer = $objectManager->getObject($className, $arguments);
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_eventMock = $this->createPartialMock(
@@ -102,7 +103,7 @@ public function setUp()
}
/**
- * Test for \Henhed\Piwik\Observer\CategoryViewObserver::execute when Piwik
+ * Test for \Chessio\Matomo\Observer\CategoryViewObserver::execute when Matomo
* tracking is enabled.
*
* @return void
@@ -144,7 +145,7 @@ public function testExecuteWithTrackingEnabled()
}
/**
- * Test for \Henhed\Piwik\Observer\CategoryViewObserver::execute when Piwik
+ * Test for \Chessio\Matomo\Observer\CategoryViewObserver::execute when Matomo
* tracking is disabled.
*
* @return void
diff --git a/Test/Unit/Observer/CheckoutSuccessObserverTest.php b/Test/Unit/Observer/CheckoutSuccessObserverTest.php
index a4f6201..2ebe547 100644
--- a/Test/Unit/Observer/CheckoutSuccessObserverTest.php
+++ b/Test/Unit/Observer/CheckoutSuccessObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\CheckoutSuccessObserver
+ * Test for \Chessio\Matomo\Observer\CheckoutSuccessObserver
*
*/
class CheckoutSuccessObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,7 +33,7 @@ class CheckoutSuccessObserverTest extends \PHPUnit\Framework\TestCase
/**
* Checkout success observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\CheckoutSuccessObserver $_testSubject
+ * @var \Chessio\Matomo\Observer\CheckoutSuccessObserver $_testSubject
*/
protected $_testSubject;
@@ -44,14 +45,14 @@ class CheckoutSuccessObserverTest extends \PHPUnit\Framework\TestCase
protected $_trackerMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
protected $_dataHelperMock;
/**
- * Piwik tracker helper mock object
+ * Matomo tracker helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_trackerHelperMock
*/
@@ -95,10 +96,10 @@ public function setUp()
$objectMgr = new ObjectManager($this);
// Create test subject
- $className = \Henhed\Piwik\Observer\CheckoutSuccessObserver::class;
+ $className = \Chessio\Matomo\Observer\CheckoutSuccessObserver::class;
$arguments = $objectMgr->getConstructArguments($className);
$this->_testSubject = $objectMgr->getObject($className, $arguments);
- $this->_trackerMock = $arguments['piwikTracker'];
+ $this->_trackerMock = $arguments['matomoTracker'];
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_trackerHelperMock = $arguments['trackerHelper'];
$this->_orderRepositoryMock = $arguments['orderRepository'];
@@ -118,7 +119,7 @@ public function setUp()
}
/**
- * Test for \Henhed\Piwik\Observer\CheckoutSuccessObserver::execute where
+ * Test for \Chessio\Matomo\Observer\CheckoutSuccessObserver::execute where
* tracking is enabled.
*
* @return void
@@ -179,7 +180,7 @@ public function testExecuteWithTrackingEnabled()
}
/**
- * Test for \Henhed\Piwik\Observer\CheckoutSuccessObserver::execute where
+ * Test for \Chessio\Matomo\Observer\CheckoutSuccessObserver::execute where
* tracking is disabled.
*
* @return void
diff --git a/Test/Unit/Observer/ProductViewObserverTest.php b/Test/Unit/Observer/ProductViewObserverTest.php
index 01d24fb..046094f 100644
--- a/Test/Unit/Observer/ProductViewObserverTest.php
+++ b/Test/Unit/Observer/ProductViewObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\ProductViewObserver
+ * Test for \Chessio\Matomo\Observer\ProductViewObserver
*
*/
class ProductViewObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,19 +33,19 @@ class ProductViewObserverTest extends \PHPUnit\Framework\TestCase
/**
* Product view observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\ProductViewObserver $_observer
+ * @var \Chessio\Matomo\Observer\ProductViewObserver $_observer
*/
protected $_observer;
/**
- * Piwik tracker mock object
+ * Matomo tracker mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_trackerMock
*/
protected $_trackerMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
@@ -85,14 +86,14 @@ class ProductViewObserverTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Observer\ProductViewObserver::class;
+ $className = \Chessio\Matomo\Observer\ProductViewObserver::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className);
$this->_trackerMock = $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker::class,
+ \Chessio\Matomo\Model\Tracker::class,
['setEcommerceView']
);
- $arguments['piwikTracker'] = $this->_trackerMock;
+ $arguments['matomoTracker'] = $this->_trackerMock;
$this->_observer = $objectManager->getObject($className, $arguments);
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_eventMock = $this->createPartialMock(
@@ -126,7 +127,7 @@ public function executeDataProvider()
}
/**
- * Test for \Henhed\Piwik\Observer\ProductViewObserver::execute where
+ * Test for \Chessio\Matomo\Observer\ProductViewObserver::execute where
* tracking is enabled.
*
* @param string $sku
@@ -204,7 +205,7 @@ public function testExecuteWithTrackingEnabled(
}
/**
- * Test for \Henhed\Piwik\Observer\ProductViewObserver::execute where
+ * Test for \Chessio\Matomo\Observer\ProductViewObserver::execute where
* tracking is disabled.
*
* @return void
diff --git a/Test/Unit/Observer/SearchResultObserverTest.php b/Test/Unit/Observer/SearchResultObserverTest.php
index 40f16ff..77221b8 100644
--- a/Test/Unit/Observer/SearchResultObserverTest.php
+++ b/Test/Unit/Observer/SearchResultObserverTest.php
@@ -1,29 +1,30 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\Test\Unit\Observer;
+namespace Chessio\Matomo\Test\Unit\Observer;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
/**
- * Test for \Henhed\Piwik\Observer\SearchResultObserver
+ * Test for \Chessio\Matomo\Observer\SearchResultObserver
*
*/
class SearchResultObserverTest extends \PHPUnit\Framework\TestCase
@@ -32,19 +33,19 @@ class SearchResultObserverTest extends \PHPUnit\Framework\TestCase
/**
* Search result observer (test subject) instance
*
- * @var \Henhed\Piwik\Observer\SearchResultObserver $_observer
+ * @var \Chessio\Matomo\Observer\SearchResultObserver $_observer
*/
protected $_observer;
/**
- * Piwik tracker mock object
+ * Matomo tracker mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_trackerMock
*/
protected $_trackerMock;
/**
- * Piwik data helper mock object
+ * Matomo data helper mock object
*
* @var \PHPUnit_Framework_MockObject_MockObject $_dataHelperMock
*/
@@ -65,11 +66,11 @@ class SearchResultObserverTest extends \PHPUnit\Framework\TestCase
protected $_queryMock;
/**
- * Piwik block mock object
+ * Matomo block mock object
*
- * @var \PHPUnit_Framework_MockObject_MockObject $_piwikBlockMock
+ * @var \PHPUnit_Framework_MockObject_MockObject $_matomoBlockMock
*/
- protected $_piwikBlockMock;
+ protected $_matomoBlockMock;
/**
* Search result block mock object
@@ -92,15 +93,15 @@ class SearchResultObserverTest extends \PHPUnit\Framework\TestCase
*/
public function setUp()
{
- $className = \Henhed\Piwik\Observer\SearchResultObserver::class;
+ $className = \Chessio\Matomo\Observer\SearchResultObserver::class;
$objectManager = new ObjectManager($this);
$arguments = $objectManager->getConstructArguments($className);
$this->_trackerMock = $this->createPartialMock(
- \Henhed\Piwik\Model\Tracker::class,
+ \Chessio\Matomo\Model\Tracker::class,
['trackSiteSearch']
);
- $arguments['piwikTracker'] = $this->_trackerMock;
+ $arguments['matomoTracker'] = $this->_trackerMock;
$this->_dataHelperMock = $arguments['dataHelper'];
$this->_layoutMock = $this->createMock(
@@ -121,8 +122,8 @@ public function setUp()
->willReturn($this->_queryMock);
$this->_observer = $objectManager->getObject($className, $arguments);
- $this->_piwikBlockMock = $this->createPartialMock(
- \Henhed\Piwik\Block\Piwik::class,
+ $this->_matomoBlockMock = $this->createPartialMock(
+ \Chessio\Matomo\Block\Matomo::class,
['setSkipTrackPageView']
);
$this->_searchResultBlockMock = $this->createMock(
@@ -158,7 +159,7 @@ protected function _prepareQueryMock($queryText, $numResults)
*/
protected function _prepareLayoutMock($blocks = [])
{
- $blockMap = [['piwik.tracker', $this->_piwikBlockMock]];
+ $blockMap = [['matomo.tracker', $this->_matomoBlockMock]];
foreach ($blocks as $name => $block) {
$blockMap[] = [$name, $block];
}
@@ -166,15 +167,15 @@ protected function _prepareLayoutMock($blocks = [])
->expects($this->any())
->method('getBlock')
->willReturnMap($blockMap);
- $this->_piwikBlockMock
+ $this->_matomoBlockMock
->expects($this->once())
->method('setSkipTrackPageView')
->with(true)
- ->willReturn($this->_piwikBlockMock);
+ ->willReturn($this->_matomoBlockMock);
}
/**
- * Test for \Henhed\Piwik\Observer\SearchResultObserver::execute where
+ * Test for \Chessio\Matomo\Observer\SearchResultObserver::execute where
* the query object does not have a result count.
*
* @return void
@@ -216,7 +217,7 @@ public function testExecuteWithNewQuery()
}
/**
- * Test for \Henhed\Piwik\Observer\SearchResultObserver::execute where
+ * Test for \Chessio\Matomo\Observer\SearchResultObserver::execute where
* the query object does not have a result count and there is no search
* result block available.
*
@@ -250,7 +251,7 @@ public function testExecuteWithNewQueryAndNoResultBlock()
}
/**
- * Test for \Henhed\Piwik\Observer\SearchResultObserver::execute where
+ * Test for \Chessio\Matomo\Observer\SearchResultObserver::execute where
* the query object has a result count.
*
* @return void
@@ -292,7 +293,7 @@ public function testExecuteWithExistingQuery()
}
/**
- * Test for \Henhed\Piwik\Observer\SearchResultObserver::execute where
+ * Test for \Chessio\Matomo\Observer\SearchResultObserver::execute where
* tracking is disabled.
*
* @return void
diff --git a/UserId/Provider/EmailProvider.php b/UserId/Provider/EmailProvider.php
index c375ac1..8885646 100644
--- a/UserId/Provider/EmailProvider.php
+++ b/UserId/Provider/EmailProvider.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\UserId\Provider;
+namespace Chessio\Matomo\UserId\Provider;
use Magento\Customer\Api\CustomerRepositoryInterface;
diff --git a/UserId/Provider/EntityIdProvider.php b/UserId/Provider/EntityIdProvider.php
index ca6918f..aed0898 100644
--- a/UserId/Provider/EntityIdProvider.php
+++ b/UserId/Provider/EntityIdProvider.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\UserId\Provider;
+namespace Chessio\Matomo\UserId\Provider;
/**
* Customer entity ID provider
diff --git a/UserId/Provider/Pool.php b/UserId/Provider/Pool.php
index 27c9ce9..d98ef85 100644
--- a/UserId/Provider/Pool.php
+++ b/UserId/Provider/Pool.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\UserId\Provider;
+namespace Chessio\Matomo\UserId\Provider;
/**
* User ID provider pool
diff --git a/UserId/Provider/ProviderInterface.php b/UserId/Provider/ProviderInterface.php
index 2e6f298..0b3d0b7 100644
--- a/UserId/Provider/ProviderInterface.php
+++ b/UserId/Provider/ProviderInterface.php
@@ -1,24 +1,25 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
-namespace Henhed\Piwik\UserId\Provider;
+namespace Chessio\Matomo\UserId\Provider;
/**
* User ID provider interface
@@ -28,7 +29,7 @@ interface ProviderInterface
{
/**
- * Returns Piwik user ID for given Magento customer ID
+ * Returns Matomo user ID for given Magento customer ID
*
* @param int $customerId
* @return string
diff --git a/composer.json b/composer.json
index fb31f98..411f039 100644
--- a/composer.json
+++ b/composer.json
@@ -1,27 +1,27 @@
{
- "name": "henhed/module-piwik",
- "description": "Piwik analytics module for Magento 2",
+ "name": "chessio/module-matomo",
+ "description": "Matomo Analytics module for Magento 2",
"type": "magento2-module",
"license": [
"AGPL-3.0+"
],
"require": {
"php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0",
- "magento/framework": "~101.0|~102.0",
- "magento/module-catalog": "~102.0|~103.0",
- "magento/module-catalog-search": "~100.0|~101.0",
+ "magento/framework": "~101.0|~102.0|~103.0",
+ "magento/module-catalog": "~102.0|~103.0|~104.0",
+ "magento/module-catalog-search": "~100.0|~101.0|~102.0",
"magento/module-checkout": "~100.0",
"magento/module-config": "~101.0",
- "magento/module-customer": "~101.0|~102.0",
+ "magento/module-customer": "~101.0|~102.0|~103.0",
"magento/module-quote": "~101.0",
- "magento/module-sales": "~101.0|~102.0",
+ "magento/module-sales": "~101.0|~102.0|~103.0",
"magento/module-search": "~100.0|~101.0",
"magento/module-store": "~100.0|~101.0"
},
"autoload": {
"files": ["registration.php"],
"psr-4": {
- "Henhed\\Piwik\\": ""
+ "Chessio\\Matomo\\": ""
}
}
}
diff --git a/dev/ci/BUILDVARS.conf.dist b/dev/ci/BUILDVARS.conf.dist
index 278eb5e..420fffa 100644
--- a/dev/ci/BUILDVARS.conf.dist
+++ b/dev/ci/BUILDVARS.conf.dist
@@ -1,2 +1,2 @@
-MODULE_NAME='Henhed_Piwik'
+MODULE_NAME='Chessio_Matomo'
MODULE_SRC_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
diff --git a/etc/acl.xml b/etc/acl.xml
index 77abfd2..80cc74d 100644
--- a/etc/acl.xml
+++ b/etc/acl.xml
@@ -2,21 +2,22 @@
-
+
diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml
index 9220676..6c0b734 100644
--- a/etc/adminhtml/system.xml
+++ b/etc/adminhtml/system.xml
@@ -2,21 +2,22 @@
-
+
sales
- Henhed_Piwik::piwik
+ Chessio_Matomo::matomo
- Piwik hostname, optionally including a path e.g. piwik.example.com or example.com/piwik
+ Matomo hostname, optionally including a path e.g. matomo.example.com or example.com/matomo
1
@@ -72,7 +73,7 @@
showInWebsite="1"
showInStore="1">
- Listed under Settings/Website in your Piwik administration panel
+ Listed under Settings/Website in your Matomo administration panel
1
@@ -115,8 +116,8 @@
showInWebsite="1"
showInStore="1">
- Henhed\Piwik\Model\Config\Source\UserId\Provider
- Send logged in customers ID to Piwik
+ Chessio\Matomo\Model\Config\Source\UserId\Provider
+ Send logged in customers ID to Matomo
1
@@ -140,8 +141,8 @@
showInWebsite="1"
showInStore="1">
- piwik/tracking/php_script_path
- Path to the Piwik tracker PHP script. Usually "piwik.php".
+ matomo/tracking/php_script_path
+ Path to the Matomo tracker PHP script. Usually "matomo.php".
required-entry
- piwik/tracking/js_script_path
- Path to the Piwik tracker Javascript. Usually "piwik.js".
+ matomo/tracking/js_script_path
+ Path to the Matomo tracker Javascript. Usually "matomo.js".
required-entry
- piwik/tracking/cdn_hostname
- Hostname for serving the Piwik tracker Javascript. May be left empty in which case the regular hostname will be used.
+ matomo/tracking/cdn_hostname
+ Hostname for serving the Matomo tracker Javascript. May be left empty in which case the regular hostname will be used.
diff --git a/etc/config.xml b/etc/config.xml
index 4e6ceb7..9cc5a69 100644
--- a/etc/config.xml
+++ b/etc/config.xml
@@ -2,21 +2,22 @@
1
500
- piwik.php
- piwik.js
+ matomo.php
+ matomo.js
diff --git a/etc/di.xml b/etc/di.xml
index 51313fc..66a4de3 100644
--- a/etc/di.xml
+++ b/etc/di.xml
@@ -2,31 +2,32 @@
-
+
- - Henhed\Piwik\UserId\Provider\EntityIdProvider
- - Henhed\Piwik\UserId\Provider\EmailProvider
+ - Chessio\Matomo\UserId\Provider\EntityIdProvider
+ - Chessio\Matomo\UserId\Provider\EmailProvider
diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml
index 44830dc..c396a12 100644
--- a/etc/frontend/di.xml
+++ b/etc/frontend/di.xml
@@ -2,35 +2,36 @@
-
-
diff --git a/etc/frontend/events.xml b/etc/frontend/events.xml
index 1c58bd4..3efc1ee 100644
--- a/etc/frontend/events.xml
+++ b/etc/frontend/events.xml
@@ -2,51 +2,52 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/etc/module.xml b/etc/module.xml
index 80c4592..3f4d41a 100644
--- a/etc/module.xml
+++ b/etc/module.xml
@@ -2,26 +2,27 @@
-
+
diff --git a/i18n/en_US.csv b/i18n/en_US.csv
index ab4e326..b75d210 100644
--- a/i18n/en_US.csv
+++ b/i18n/en_US.csv
@@ -1,12 +1,12 @@
-"Piwik API","Piwik API"
+"Matomo API","Matomo API"
"Tracking API","Tracking API"
"Enable Tracking","Enable Tracking"
"Yes","Yes"
"No","No"
"Hostname","Hostname"
-"Piwik hostname, optionally including a path e.g. piwik.example.com or example.com/piwik","Piwik hostname, optionally including a path e.g. piwik.example.com or example.com/piwik"
+"Matomo hostname, optionally including a path e.g. matomo.example.com or example.com/matomo","Matomo hostname, optionally including a path e.g. matomo.example.com or example.com/matomo"
"Site ID","Site ID"
-"Listed under Settings/Website in your Piwik administration panel","Listed under Settings/Website in your Piwik administration panel"
+"Listed under Settings/Website in your Matomo administration panel","Listed under Settings/Website in your Matomo administration panel"
"Enable Link Tracking","Enable Link Tracking"
"Enable tracking of outlinks and downloads","Enable tracking of outlinks and downloads"
"Link Tracking Timer","Link Tracking Timer"
@@ -14,11 +14,11 @@
"Enable User ID Tracking","Enable User ID Tracking"
"Customer Entity ID","Customer Entity ID"
"Customer E-mail","Customer E-mail"
-"Send logged in customers ID to Piwik","Send logged in customers ID to Piwik"
+"Send logged in customers ID to Matomo","Send logged in customers ID to Matomo"
"Advanced Options","Advanced Options"
"Javascript Path","Javascript Path"
-"Path to the Piwik tracker Javascript. Usually ""piwik.js"".","Path to the Piwik tracker Javascript. Usually ""piwik.js""."
+"Path to the Matomo tracker Javascript. Usually ""matomo.js"".","Path to the Matomo tracker Javascript. Usually ""matomo.js""."
"PHP Script Path","PHP Script Path"
-"Path to the Piwik tracker PHP script. Usually ""piwik.php"".","Path to the Piwik tracker PHP script. Usually ""piwik.php""."
+"Path to the Matomo tracker PHP script. Usually ""matomo.php"".","Path to the Matomo tracker PHP script. Usually ""matomo.php""."
"CDN Hostname","CDN Hostname"
-"Hostname for serving the Piwik tracker Javascript. May be left empty in which case the regular hostname will be used.","Hostname for serving the Piwik tracker Javascript. May be left empty in which case the regular hostname will be used."
+"Hostname for serving the Matomo tracker Javascript. May be left empty in which case the regular hostname will be used.","Hostname for serving the Matomo tracker Javascript. May be left empty in which case the regular hostname will be used."
diff --git a/i18n/it_IT.csv b/i18n/it_IT.csv
index 6feabc1..23e794e 100644
--- a/i18n/it_IT.csv
+++ b/i18n/it_IT.csv
@@ -1,12 +1,12 @@
-"Piwik API","Piwik API"
+"Matomo API","Matomo API"
"Tracking API","Tracking API"
"Enable Tracking","Abilita Tracking"
Yes,Si
No,No
Hostname,Hostname
-"Piwik hostname, optionally including a path e.g. piwik.example.com or example.com/piwik","Piwik hostname, opzionalmente include un percorso es. piwik.example.com o example.com/piwik"
+"Matomo hostname, optionally including a path e.g. matomo.example.com or example.com/matomo","Matomo hostname, opzionalmente include un percorso es. matomo.example.com o example.com/matomo"
"Site ID","ID Sito"
-"Listed under Settings/Website in your Piwik administration panel","Elencati in Impostazioni/Sito nel tuo pannello di amministrazione Piwik"
+"Listed under Settings/Website in your Matomo administration panel","Elencati in Impostazioni/Sito nel tuo pannello di amministrazione Matomo"
"Enable Link Tracking","Abilita Link Tracking"
"Enable tracking of outlinks and downloads","Abilita tracking di outlinks e downloads"
"Link Tracking Timer","Link Tracking Timer"
diff --git a/i18n/sv_SE.csv b/i18n/sv_SE.csv
index 540e575..aae1298 100644
--- a/i18n/sv_SE.csv
+++ b/i18n/sv_SE.csv
@@ -1,12 +1,12 @@
-"Piwik API","Piwik API"
+"Matomo API","Matomo API"
"Tracking API","API för spårning"
"Enable Tracking","Aktivera spårning"
"Yes","Ja"
"No","Nej"
"Hostname","Värdnamn"
-"Piwik hostname, optionally including a path e.g. piwik.example.com or example.com/piwik","Piwik-värdnamn, alternativt inkluderande sökväg t.ex. piwik.example.com eller example.com/piwik"
+"Matomo hostname, optionally including a path e.g. matomo.example.com or example.com/matomo","Matomo-värdnamn, alternativt inkluderande sökväg t.ex. matomo.example.com eller example.com/matomo"
"Site ID","Webbplatsens ID"
-"Listed under Settings/Website in your Piwik administration panel","Finns att hitta under Inställningar/Webbplatser i Piwiks administrationspanel"
+"Listed under Settings/Website in your Matomo administration panel","Finns att hitta under Inställningar/Webbplatser i Matomos administrationspanel"
"Enable Link Tracking","Aktivera länkspårning"
"Enable tracking of outlinks and downloads","Aktivera spårning av utlänkar och nedladdningar"
"Link Tracking Timer","Länkspårningstimer"
@@ -14,11 +14,11 @@
"Enable User ID Tracking","Aktivera spårning av användar-ID"
"Customer Entity ID","Kundens entitets-ID"
"Customer E-mail","Kundens E-postadress"
-"Send logged in customers ID to Piwik","Skicka inloggade kunders ID till Piwik"
+"Send logged in customers ID to Matomo","Skicka inloggade kunders ID till Matomo"
"Advanced Options","Avancerade inställningar"
"Javascript Path","Sökväg till javascript"
-"Path to the Piwik tracker Javascript. Usually ""piwik.js"".","Sökväg till Piwik-spårarens javascript. Vanligtvis ""piwik.js""."
+"Path to the Matomo tracker Javascript. Usually ""matomo.js"".","Sökväg till Matomo-spårarens javascript. Vanligtvis ""matomo.js""."
"PHP Script Path","Sökväg till PHP-skript"
-"Path to the Piwik tracker PHP script. Usually ""piwik.php"".","Sökväg till Piwik-spårarens PHP-skript. Vanligtvis ""piwik.php""."
+"Path to the Matomo tracker PHP script. Usually ""matomo.php"".","Sökväg till Matomo-spårarens PHP-skript. Vanligtvis ""matomo.php""."
"CDN Hostname","CDN-värdnamn"
-"Hostname for serving the Piwik tracker Javascript. May be left empty in which case the regular hostname will be used.","Värdnamn för Piwik-spårarens javascript. Lämna tomt för att använda det allmänna värdnamnet."
+"Hostname for serving the Matomo tracker Javascript. May be left empty in which case the regular hostname will be used.","Värdnamn för Matomo-spårarens javascript. Lämna tomt för att använda det allmänna värdnamnet."
diff --git a/registration.php b/registration.php
index ef2d4db..bd2660a 100644
--- a/registration.php
+++ b/registration.php
@@ -1,25 +1,26 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
- 'Henhed_Piwik',
+ 'Chessio_Matomo',
__DIR__
);
diff --git a/view/frontend/layout/default.xml b/view/frontend/layout/default.xml
index ab09e03..c6f8902 100644
--- a/view/frontend/layout/default.xml
+++ b/view/frontend/layout/default.xml
@@ -2,31 +2,32 @@
-
+
diff --git a/view/frontend/templates/piwik.phtml b/view/frontend/templates/matomo.phtml
similarity index 81%
rename from view/frontend/templates/piwik.phtml
rename to view/frontend/templates/matomo.phtml
index c21f9a0..fa39888 100644
--- a/view/frontend/templates/piwik.phtml
+++ b/view/frontend/templates/matomo.phtml
@@ -1,35 +1,36 @@
.
+ * along with Chessio_Matomo. If not, see .
*/
?>
-
+
@@ -59,7 +60,7 @@