Why cant I see any ecommerce data after configuring a product?

Total noob to Matomo. Like it alot so far, but am having some issues with a custom implementation of Matomo ecommerce tracking on a custom platform.

Basically, I want to track product category visits, product visits, then cart additions / removals, and finally orders (basic ecom setup). I started in Tag Manager by implementing a tag and trigger combination.

The trigger fires when a specific page is visited and the trigger fires off a custom html tag that includes this code (tags omitted):

console.log(“Logo Design Pixel Fired.”);
_paq.push([‘setEcommerceView’,‘33’,‘Logo Design’,[‘Creative Services’,‘Logo Design’],]);

I do see the console stuff log calls show in the console - so I know the trigger works properly and that the code is being executed.

What I dont see is any XHR/AJAX transactions occuring in the Network, and I do not see the product tracking in Matomo.

This is the only ecommerce tag (of many) I have to implement, so I was hoping to get a little assistance or an explanation as to what Im missing and why I dont see data in the tracker.

Any help is much appreciated.


In the Matomo configuration variable, have you checked this:

… … … … … … … … … … … … … … … … … … … … … … … … … … …

Hi Phillippe,
Yes I have a Motomo Variable called Page. It is set as the default tracker.

Can you confirm _paq exists when the tag is executed?

When I console.log _paq - this is what I see…

Screenshot 2021-12-09 112919

It appears to be an array of the values pushed onto _paq.

Not to confuse things - but I do now see some PING requests that I assume are coming from Matomo. This is a result of me changing the trackers trigger to Pageview from Window Loaded.

The funny thing is that one of the requests (the one with the data payload) seems to be going to the wrong place. Instead of going to my analytics endpoint - its making a request against the sites server (which has a response of the page referenced) - and then a call to matomo.php at the proper endpoint.

I still do not see any ecommerce stats in Matomo however.

If the Matomo endpoint is not reached, you won’t have any stat in Matomo…

What is your tracking code?

Hello Philippe,
So forward progress is starting to happen. After your line of questions from yesterday, I started tracing the javascript code, and have found that the tracker is in fact loading but it is under the _mtm object instead of _paq (which I grabbed from the tutorials).

I have switched out _paq with _mtm in the code, and now I do see something different. For each of the calls to track ecommerce, Im getting method not found errors now:

However, now Im honestly wondering if the tutorial I am using on the Matomo website is accurate.

you can use _paq (that is not the same API than _mtm) only if you check the option Register As Default Tracker (and you did)
But I want to understand why the tracking URL is wrong…
It must be a problem either in the Matomo configuration variable or in the Matomo startup script…

What information can I provide to you to diagnose?

Here is my loader:

var _mtm = window._mtm = window._mtm || [];
_mtm.push({‘mtm.startTime’: (new Date().getTime()), ‘event’: ‘mtm.Start’});
var d=document, g=d.createElement(‘script’), s=d.getElementsByTagName(‘script’)[0];
g.async=true; g.src=‘https://analytics.mediagiantdesign.com/js/container_P3kjdhXJ.js’; s.parentNode.insertBefore(g,s);

And here is a screen shot of my settings for it:

More to come in next post - cant include more than 1 image yet.

And here is the matomo configuration I have set for it:

Very strange, I really don’t understand why your _paq tracks on wrong endpoint…
@Lukas, any idea?

Hi Philippe,
No idea - I have been messing with this for days at this point. Changing code, recreating all of the trackers, tags, triggers, etc - and nothing. I’ve updated Matomo to 4.6.2 - and no matter what I do or try, I get the same end result when I try to track ecommerce.

Not sure what to try next, Im wondering at this point if ecommerce tracking actually works in Matomo?

Do you use it?


I don’t use ecommerce.
The only thing for me is to test…
In order to understand where the problem comes from, try first to track only with the standard tracking code (no MTM, only with _paq):

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  /* also probably the ecommerce view tracking */
  (function() {
    var u="https://matomo-server/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
<!-- End Matomo Code -->

What happens then?

Sorry for the delay - took me a little bit to circle back around to this. I have implemented what you sent above (just the standard non Tag Manager tracker code).

Tracking works.

I then added to the beginning of it based as a test, the code for the ecommerce tracking of a product like this:

  var _paq = window._paq = window._paq || [];

    "6", // (Required) productSKU
    "Business Website Design", // (Optional) productName
    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
  _paq.push(["setCookieDomain", "*.mediagiantdesign.com"]);
  (function() {
    var u="https://analytics.mediagiantdesign.com/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);

It worked. So I am assuming that the issue is something with the tag manager. Perhaps the execution order? In this example, I implemented the _paq push before the trackpageview is ever called. Im wondering if that is the difference.