How correctly track e-commerce page view

Hello everyone, I’m implementing ecommerce tracking in a woocommerce without the standard plugin.
(This choice is just to have a little experience to use in 2024 when our totally custom ecommerce will be ready)

I have a question about the Product View Snippet.

We try to implement the code in the guide

// Push Product View Data to Matomo - Populate parameters dynamically
    "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 

Do I really need the trackPageView? Couse, I have the trackPageView in the incorporation script, and in this why I get two page visit instead one, is normal?

Other Question, in the ecommerce page, why I don’t see nothing about the page view?

Hi @forna91
As functionally, product view is a page view, and technically, page views are triggered by trackPageView, you have to to setEcommerceView then trackPageView. In order to not have 2 page views, just call the setEcommerceView before the trackPageView.

I think this should be there: