Title: Wrong Data Format in DataLayer
Last modified: October 7, 2019

---

# Wrong Data Format in DataLayer

 *  [greencure](https://wordpress.org/support/users/greencure/)
 * (@greencure)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/wrong-data-format-in-datalayer/)
 * Hi Thomas,
 * Awesome job with the plugin! 🙂
 * I do have a query. I am trying to create variables in GTM to fetch data created
   in the DataLayer (for a third party tool). I am using woocommerce and have enhanced
   e-commerce activated.
 * However, numeric data variables like price, cart total are being stored as strings
   in the DataLayer. Can you help me with this?
 * Website – [http://www.greencurewellness.com](http://www.greencurewellness.com)
    -  This topic was modified 6 years, 8 months ago by [greencure](https://wordpress.org/support/users/greencure/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * (@duracelltomi)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/wrong-data-format-in-datalayer/#post-12008276)
 * Hi,
 * Since JavaScript is loosely typed, numbers stored as strings usually can be used
   to populate 3rd party tags. I’ve added some code into the dev version that will
   enfore int and float types but according to my experiences, it works if the number
   is stored as a string as well.

Viewing 1 replies (of 1 total)

The topic ‘Wrong Data Format in DataLayer’ is closed to new replies.

 * ![](https://ps.w.org/duracelltomi-google-tag-manager/assets/icon-256x256.png?
   rev=1708451)
 * [GTM4WP - A Google Tag Manager (GTM) plugin for WordPress](https://wordpress.org/plugins/duracelltomi-google-tag-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duracelltomi-google-tag-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duracelltomi-google-tag-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Thomas Geiger](https://wordpress.org/support/users/duracelltomi/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/wrong-data-format-in-datalayer/#post-12008276)
 * Status: not resolved