Matomo Tag Manager: eCommerce tracking product views and category views

Hi :slight_smile:

I am using Matomo for some years now to track visits and eCommerce - orders of my Webshop. I am currently updating my webshop-matomo-plugin (jtlshop5) and i want to user the matomo tag manager from now on.

For development i use docker containers for the shopsoftware and matomo. Matomo is the current bitnami-docker-container ver 4.15.0.

A good part of the plugin is ready and working. Normal tracking of site views via the container works, this was easy. A little trickier is eCommerce tracking with matomo tag manager. Despite my french is bad i used this tutorial:

Tracking cart_updates and orders work too, i can see them on my docker-test-matomo in the eCommerce-section.

…but i am not sure about product_views and category_views…i can’t see them in matomo. But i am not really sure where i have to look… Where can i see product_views and category_views in matomo? Should these appear in the “Ecommerce Log”?

Bye, Mojo

I have a plugin for JTL shop ready so far. It just needs to be refined now.

You can contact me and I can send it to you.

Purchase and category and product tracking are currently taking effect.

ok, i solved the problem. I had a closer look this morning at the matomo faq for manual eCommerce tracking:

I noticed that there is lacking a line at both html custom tags for product view and category view:

// You must also call trackPageView when tracking a product view 
_paq.push(['trackPageView']);

this is not correct in the french tutorial… ;-(

@csaeum:
thank you very much for you offer to help!

Hi @ronan_hello, I just mention you to let you have a look at the last message from Mojo78…:

(french tutorial = https://ronan-hello.fr/series/matomo/ecommerce-matomo-tag-manager)

Hi,

This line of code was not mandatory by delaying the matomo classic tracking code by one millisecond (which avoids duplicates in the return of page views).

I’ve updated the guide along your lines, but I’m still not convinced this is the best solution.

Regards,
Ronan HELLO

Hi,
@ronan_hello
you are right, with the additional line (_paq.push([‘trackPageView’]):wink: i had dublicate page views on product-pages, too.

Currently i believe the easiest solution is what you wrote: I use a custom-html tag to track all page views now (because i need Cookie Consent) and i delay the page-view tag by 1ms in Matomo. I wasn’t even aware that there is the possibility in the Matomo Tag-Manager → Tag itsellf:

Show advanced settings → Fire Delay

I tested a little this morning - now matomo tracking and matomo eCommerce tracking seems to work. I ask myself if 1ms is always enough? Or is it possible that the product-view will not be tracked now and then because _paq is not updated soon enough with the product view?
Bye, Jörg

HI @Mojo78,

I roll back the tutorial with my first technique (with delay).
I guess 1ms is enought, it’s just to say to the Matomo tag Manager “yes, there is a delay, wait for the page tobe ready”.

Regards,
Ronan

1 Like