# Use the ecommerce datalayer for GA4 ecommerce

**URL:** <https://community.piwik.pro/t/use-the-ecommerce-datalayer-for-ga4-ecommerce/1342>\
**Category:** Data collection and tags\
**Created:** [December 8, 2022, 2:18pm UTC](https://community.piwik.pro/t/use-the-ecommerce-datalayer-for-ga4-ecommerce/1342 "2022-12-08T14:18:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pslonina](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/pslonina/32/1711_2.png) [@pslonina](https://community.piwik.pro/u/pslonina)\
**Post date:** [December 9, 2022, 8:59am UTC](https://community.piwik.pro/t/use-the-ecommerce-datalayer-for-ga4-ecommerce/1342/2 "2022-12-09T08:59:07Z")

</div>

Hello @ValPiwik ,  
Did you have a chance to look into this article [How to set up ecommerce tracking? - #2 by pp.support](https://community.piwik.pro/t/how-to-set-up-ecommerce-tracking/79/2)? The data layer structure is different, but it’s just a matter of adjusting the variables. Please make sure there is a loop that iterates through the cart (you need to add each product separately). You can use the [tracker debugger](https://help.piwik.pro/support/collecting-data/tracker-debugger/) to check if the variables were correctly assigned.

Thanks,  
Piotr

---

_[View the full topic](https://community.piwik.pro/t/use-the-ecommerce-datalayer-for-ga4-ecommerce/1342)._
