# PriceId and itemId in the cart dataLayer

URL: https://shoptet.dev/news/frontend/priceid-and-itemid-in-the-cart-datalayer

May 3, 2022 · One min read
Pavel Husa

Cart dataLayer contains now `priceId` . Before this update, dataLayer was inconsistent when added products, and dataLayer didn't include `itemId` . This parameter is needed to update or remove the product from the cart.

Now it is possible better handling function for [removing items](/news/frontend/how-to-properly-remove-a-product-from-the-cart-with-javascript/) and [updating quantity](/news/frontend/how-to-properly-update-quantity-in-cart-with-javascript/) .

Another fix has brought adding products with combination of `productId` and `parameterValueId` now updates dataLayer properly (formerly mentioned [here](/templates/add-to-cart-javascript/) ).

**Tags:**
- [Frontend](/news/tags/frontend/)
