I’m using the Matomo plugin on a WordPress website where Angular is also included (thanks to Web Components). I would like to track, for example, when a product page is visited with my Angular application (using the methods available in the tracking API such as setReferrerUrl(), setEcommerceView() …). But the problem is that I don’t know how to link my e-commerce products to Matomo. In order, for example, that Matomo understands which product is visited when I use the setEcommerceView method (the first parameter must be the “productSKU” which must be linked to the id of my product in the API). I don’t use WooCommerce and my products are stored in an API I have access to (source code too). This problem prevents me from having statistics of product pages visited, and actions such as adding to cart, payment, etc… in the “E-Commerce” section of the Matomo plugin.
Tracking is done using the ngx-matomo library for Angular.
For example, when a user goes to a product page, three calls are made:
setReferrerUrl() with the current URL as a parameter
setEcommerceView() with product ID, product name, product category, product price in parameters
trackPageView() with the product name as a parameter
The page visit is tracked and I can see it in the Matomo plugin “Visits” section.
But the product is not tracked: there is no data on the Matomo admin (E-Commerce section).
Anyone have a solution to this?