Hello, I’m trying Matomo on my test shopify store(development store). I’m using this doc for setting up Matomo tracker code on the store.
In the doc I can see some code snippet added in cart-template.liquid
, but in my store I’m not able to find that cart-template.liquid
. I checked Sections folder but it was not present(also cart-template.liquid
is not present in any other folders also).
Where should I add that code snippet which is mentioned in the doc? are there any equivalent of cart-template.liquid
for below shown image
Script mentioned in the doc
<script>
var _paq = window._paq = window._paq || [];
{% for item in cart.items %}
{% capture tag_list %}{% for tag in item.product.tags limit:5 %}{{ tag }}{% if forloop.last == false %}::{% endif%}{% endfor %}{% endcapture %}
{% assign tag_array = tag_list | split: '::'%}
_paq.push(['addEcommerceItem',
{{ item.product_id }}, // (Required) productSKU
{{ item.title | json }}, // (Optional) productName
{{ tag_array | json }}, // (Optional) productCategory
{{ item.final_price | money_without_currency }}, // (Recommended) price
{{ item.quantity }} // (Optional, defaults to 1) quantity
]);
{% endfor %}
_paq.push(['trackEcommerceCartUpdate', {{ cart.total_price | money_without_currency }}]);
</script>