Setting up ecommerce tracking - am I doing it right?

I use Joomla and VirtueMart editorial system.
For some sites, I don’t see statistics of sold products and categories, but only total orders.
I want to make sure I measure everything correctly.

I use this extension to insert the tracking code:

I insert two codes into the pages.
The first code is inserted on all pages of the site:

  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(["setCookieDomain", "*"]);
  _paq.push(["setDomains", ["*"]]);
  _paq.push(["setDoNotTrack", true]);
  (function() {
    var u="//";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
<noscript><p><img src="//;rec=1" style="border:0;" alt="" /></p></noscript>

This second code is inserted by the plugin only in the last step of the order:

{{# items }} 
  "{{ product_sku }}",
  "{{ product_name }}",
  "{{ category_name }}",
  {{ product_final_price }},
  {{ product_quantity }}
{{/ items }}
  "{{ order_number }}", 
  {{ order_total_rounded }},
  {{ order_subtotal }},
  {{ order_tax }},
  {{ order_shipment }},
  {{ order_discount }}

Am I correct?
I suspect that in the second code there are no line names, only values… so I have to follow the exact order of each line in the code? Because matomo believes that the first line will always be the product_sku of the product?