Data Tag unable to read ecommerce.items


We are migrating from the sGTM GA4 client to the custom stape data-tag and data-client solution. The general setup is working, and the server side is receiving the events.

Sadly, we are encountering an issue when reading data from the ecommerce.items entry: The read value is always [null]. Attached is a screenshot from the browser console showing the payload which is being sent to our sGTM server. The option to “Send all from DataLayer” is not resolving the problem, as the provided value is also [null]

The items key is added as an event data property, as shown in this example add_to_cart event setup:

Do we miss any further configuration? Do you have any hints what could be wrong?

Thank you!

After banging my head against the wall I found the issue. We have been pushing simple classes to the datalayer and for whatever reason, this caused the issue described in the initial post. Removing the types via JSON.parse(JSON.stringify(...)); resolved the problem!

1 Like