Abandoned Cart Implementation in Shopify

Hello, I am tried finding solution to the implementation of Abandoned Cart into Shopify but I am unaware how this metric is being tracked and how it works. Is there any way to implement the abandoned cart tracking into the tracking code in order to track this metric in shopify?

Reading the doc:

Understanding the Abandoned Cart Analytics

Cart abandonment happens when somebody adds a product to their shopping cart but for one reason or another, doesn’t make a purchase. Often the total value of products abandoned in online shopping carts, accounts for a large amount of lost potential revenue. Without analytics, you might never realise this was happening. Matomo can not only track how many people abandon their carts, but also the potential revenue that was lost in their carts. If you discover that you have a problem with lots of people abandoning carts you can use Matomo to dig into what might be happening.

I understand that if a user adds items to the cart (thanks to the cart update event), and does never order, then Matomo will deduce the cart has been abandoned…

to track this feature, is the basic tracking code on theme.liquid adequate to track it? or is there a specific file we can add it in shopify to track it?