Ecommerce product views via tracking API

Dear All,

I’m trying to set up matomo with my application. However, because many users tend to have plugins installed that block javascript tracking, I’d prefer to feed matomo directly from my application via the API. I see this API (Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3) allows for basic order tracking, but I was unable to find way to report product views or add to cart reporting (as per Ecommerce Analytics User Guide - Analytics Platform - Matomo), which are crucial for me. Is there a way to report such actions via the API (or some other way, but not using the JavaScript or any other client-side technology)?

Marek

Hi,

It is definitly possible as the Javascript tracking accesses the same API endpoint.

I unfortunatly know very little about Ecommerce Analytics, so I’d recommend you to just take a look at the URLs the Javascript tracker is accessing when e.g. adding a product to the cart.

OK, will try to reverse-engineer it. I assume there isn’t any relevant up-to date documentation ?

Hi,

The parameters are documented in Tracking HTTP API: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

Well, not really - or am I missing something? :slight_smile: I already read that documentation - as mentioned in my initial post. The problem is - the only API described there related to e-commerce is the one that tracks orders. I have not found anything on registering product views there - hence my initial question.

Wouldn’t you track them as regular page views and just add additional API for events like adding to cart?

They are tracked as regular page views, but that way they do not end up on the e-commerce Matomo reports pages and are not split into categories, etc.

The JavaScript tracking provided by Matomo allows tracking of not only orders, but also product views, adding to cart (to identify dropped carts, etc.). However the Tracking API documentation describes only API for tracking orders - which is a subset of what the script allows.

hey @marek have you found an answer for this later?