Matomo Ecommerce Analytics for Magento 2

Matomo Magento Module by aMiSTACX

Introducing Trak for Matomo-Magento

The Trak module that resides on Magento is state-of-the-art. A module built specifically for Magento 2.3.2+ and Matomo 3.11+, and will allow a seamless integration with our aMiSTACX stack G4+ for Matomo 3.11+.

Trak is available for aMiSTACX S3 Titanium stacks. The only caveat is you will need to use an aMiSTACX stack for Matomo. This is the only way we can assure a completely turnkey and hassle-free solution solution for our customers.

Trak Features

From the Matomo dashboard you will be able to use the ecommerce features, and track Cart Abandonment, Visits, Sales, SKUs, Products, and much more. Here is a screenshot from our Trak in use on our LUMA demo server:

Trak Analytics for Magento and Matomo

We are very pleased with Trak, and can’t wait to get it into the hands of our customers. Hopefully with some great feedback we can even make it better!

Trak for Matomo/Magento Configuration

Magento Prerequisites

Step 1. Make sure you are using an aMiSTACX stack that is designated for the Matomo/Magento aMiSTACX Trak module. This special stack will have a special file in the document root called do_not_delete.php.

Step 2. Install Matomo Custom Dimensions Module:

Note: Newer versions of Matomo have the Dimensions Module built-in, and do NOT require installation.

The Custom Dimensions plugin is available on the Matomo Marketplace for free.

  • Log in as a Super User
  • Go to “Administration” by clicking the cogwheel icon in the top right
  • Click on the “Marketplace” menu item
  • Find the Custom Dimensions plugin in the list
  • Press “Install
  • On the next page, press “Activate” (or alternatively: execute the following command ./console plugin:activate CustomDimensions)

The Trak module is configured from the Magento admin console > Stores > Settings > Configuration > AMISTACX > Trak.

Trak for Matomo, Magento dashboard

Enable Tracking : Enable or disable tracking

aMiSTACX Matomo Server hostname : Set the path to your Matomo server, e.g. https://matomo.example.com

Matomo Website ID : Website ID in Matomo system. You can find the Site ID in the Settings > Websites > Manage

For example, say you want to monitor the site https://mage.amistacxdemos.io, you will get the Matomo site ID 5 from the Matomo console.

Matomo Site ID

Enable Link Tracking : Enable tracking of outlinks and downloads

Enable Abandoned Orders Tracking : Sending an email notification to the user if they abandon their order.

Order lifetime in min : After “X” minutes Trak will mark the order as abandoned.

Goal ID in Matomo : Create a custom goal and get the ID for abandoned orders tracking. In Matomo, Settings > Websites > Goals. Next, create a new goal named “Abandoned orders“. Set “Goal is triggered” option* to “Manually“. You will now see a new report in Matomo in Goals > Abandoned orders.

Matomo Goal ID

*Optionally, you can “Allow Goal to be converted more than once per visit.”

API Authentication Token : Matomo security token. This is found in the API section of Matomo. Just copy and paste into the Trak field.

Enable Payment Systems Tracking : Enable tracking of payment systems. For example, say you want to track number of payments made by check, credit card, or crypto. See next for configuration.

Dimension ID in Matomo : Custom dimension ID for payment systems tracking. In Matomo, we need create a new visit dimension.
Name “Payment system“. You will see a new report in Matomo in Ecommerce > Sales > Sales by User attribute > Payment Type

Using Trak checkout analytics with Matomo for Magento 2

Note: The Matomo Dimensions module will need to be installed. [Now part of core Matomo.]

Link Tracking Timer : Delay for link tracking in milliseconds.

Advanced options section

Matomo PHP Tracking Script Path : Path to the Matomo tracker PHP script. Should be matomo.php.
Matomo Javascript Tracking Script Path : Path to the Matomo tracker Javascript. Should be matomo.js.
CDN Hostname : Hostname for serving the Matomo tracker Javascript. May be left empty in which case the regular hostname will be used.

~ Lead_Robot