Ecommerce orders not collected

Hi,

Recently, I’ve implemented Piwik Pro in an ecommerce. This is the environment:

  • CMS: WordPress with WooCommerce

  • Tag Manager: Google Tag Manager, using dataLayer templates for ecommerce events

  • Cookie Manager: CookieYes

This is the staging environment, where trial orders can be made if necessary to reproduce the issue: https://staging2.lalomamarket.es/

The issue is that carts and view items are collected properly, but orders not. Debugging, the order seems to be collected, but there is no information about the order in analytics, despite ecommerce reports are enabled.

Any thoughts?

Best,
Miguel

Hi @Miguel,

When it comes to the order not being tracked, it seems that there is a broken event being sent -

Your item_id is an integer where a string is expected -

While debugging your website I noticed that you have some issues on the website.

How are you adding the container to the website?
Here is a guide that you can follow for WooCommerce - WooCommerce: install a container (with a tracking code) | Piwik PRO help center

It seems that you are adding the container after the consent is given.
Please keep in mind that you won’t be able to collect anonymous data when you do it this way.
(Collect data in a privacy-friendly way | Piwik PRO help center)
If you would want to collect anonymous data when users don’t consent, you’d need to create an integration with your current tool - How can I integrate a third-party cookie consent tool with Piwik PRO? | Piwik PRO help center

Hi,

Ok, got it. I have to change the data type for item_id. Are there any ways to transform the data into string? The dataLayer variable is generated through the plugin GTM4WP, so I have activated an option to add it a preffix to convert into string, but it only works for “id”. “item_id” remains unchanged.


I wanted to do a parallel implementation with just a single dataLayer and triggrers and I used the option of integrate it through dataLayer integration:

Regarding your question about the container, I am launching the Piwik PRO container inside a GTM container, after given the consent for “analytics” cookies. I am using CookieYes as a cookie manager, so I disabled all the consent options in my tags to get all of them centralized in CookieYes consent. Is this an issue for Piwik PRO?

Best,
Miguel

Hi @Miguel,

In this case I presume you can store the item_id in a DL variable and create a custom js variable which would change the item_id to a string. I don’t think you can then use the variable it in the product mapping since its looking for the name of the keys (I might be wrong though so might be worth to try) but you can use our solution template and add it there. (you’ll have more flexibility with the code etc.)

You can find our order template here - Solution Templates | Piwik PRO

Fixed! after replacing “item_id” by “id” the orders started to be collected.
photo5935746607138062156

Thanks for your support.

Best,
Miguel