How to fill in values within Matomo JavaScript?

I try to follow also eCommerce cart and visitors CTA.

An example: Item ID, description and category.How to fill in data in such Javascript?

If we use GTM, can be pushed data feed?

I have found a source:

// 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']);

If you use GTM, you can use its tag templates and also use the standard data layer.