So I tried everything, but ecommerce events are simply not being triggered.
I am using wordpress, I have connect matomo plugin and I am self hosting matomo e.g matomo on premise.
I tried filling up the code dynamically by using product info, I even tried this:
// Push Product View Data to Matomo - Populate parameters dynamically
_paq.push(['setEcommerceView',
"0123456789", // (Required) productSKU
"Ecommerce Analytics Book", // (Optional) productName
"Books", // (Optional) categoryName
9.99 // (Optional) price
]);
// You must also call trackPageView when tracking a product view
_paq.push(['trackPageView']);
just the plain simple code example that’s in the guide.
I found somewhere here that because the initialization code is already calling trackPageView that is the issue, so I truned off the plugin and just used custom code, and in that custom code I added only this:
// Push Product View Data to Matomo - Populate parameters dynamically
_paq.push(['setEcommerceView',
"0123456789", // (Required) productSKU
"Ecommerce Analytics Book", // (Optional) productName
"Books", // (Optional) categoryName
9.99 // (Optional) price
]);
// You must also call trackPageView when tracking a product view
_paq.push(['trackPageView']);
and yet again still it didn’t work and no ecommerce view event is being called…
Can anyone give me a hand for this, anything at all I would appreciate it greatly as I need to get this done asap but I’ve literally ran out of ideas what to try and test and see if it will work…
Hi @fahir ,
How do you know it’s not working?
Note: Neither the visit log nor the ecommerce log will show that a page view was tracked as an ecommerce view.
The only place to look is here later, when your reports have been generated (see red frame):
So the ecommerce view will not show in the logs like the ecommerce order shows in the image above?
I thought it will show there?
Same as cart changes, cause I also have issues with cart where abandoned cart shows after someone adds to cart… But I first wanted to fix the ecommerce view…
Yes, you need the trackPageView to track the ecommerce view. Like in your example above.
Regarding abandoned carts: As soon as you add a product to the cart and haven’t yet purchased it, the Matomo log shows it as if the cart had been abandoned.
Only when you make a purchase does it change to an order.
From what I can see in your screenshots, everything is normal and as it should be.
Okay thank you very VERY much. The problem is I didn’t understand how matomo ecommerce view works, I thought it should show in the logs. And also didn’t understand how the cart works, so basically even though you call set cart it shows cart abandoned… thank you…
While you’re being friendly if I can take advantage of that with another question…
In regards to matomo white label, are there following options: