# New datalayer variable in TMS for the ID of the reservation

**URL:** <https://community.piwik.pro/t/new-datalayer-variable-in-tms-for-the-id-of-the-reservation/445>\
**Category:** Data collection and tags\
**Created:** [January 31, 2022, 2:57pm UTC](https://community.piwik.pro/t/new-datalayer-variable-in-tms-for-the-id-of-the-reservation/445 "2022-01-31T14:57:13Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [February 5, 2022, 9:11am UTC](https://community.piwik.pro/t/new-datalayer-variable-in-tms-for-the-id-of-the-reservation/445/7 "2022-02-05T09:11:01Z")

</div>

Thanks Cédric,  
The problem was that the command

```auto
      _paq.push(["addEcommerceItem",product.id, product.name, product.category, product.price, product.quantity])

```

wouldn’t work with a SKU that is a number (please see the documentation [here](https://developers.piwik.pro/en/latest/data_collection/web/javascript_tracking_client/api.html?highlight=addecommerceitem#e-commerce)). It needs to be stringified. You can either make sure that it’s pushed as a string or use `toString()` method to convert the product.id to a string. Once the product.id is stringified, everything works:

![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/1X/d010cc820d662a5023dffe4299bad6107d4e49f1.png)

Please let me know if it helped.

---

_[View the full topic](https://community.piwik.pro/t/new-datalayer-variable-in-tms-for-the-id-of-the-reservation/445)._
