cartContent skus with zeros are wrong
-
Hi, thanks for this plugin, we are facing an issue in the cartContent, I think the use of
JSON_NUMERIC_CHECKin thecartContentmakes any sku that has zeros at front to be eliminated. this records the wrong sku and creates an inconsistency between the “cartContent” “items” and the “ecommerce” “items”"000035180" → 35180"cartContent": {
"totals": {
"applied_coupons": [],
"discount_total": 0,
"subtotal": 234,
"total": 234
},
"items": [
{
"item_id": 35180,
"item_name": "Blue Eagle BE-PBW-04 MagSafe Power Bank 3in1 with Built in Bracket 10000mAh White",
"sku": 35180,
"price": 39.9,
"stocklevel": 4,
"stockstatus": "instock",
"google_business_vertical": "retail",
"item_category": "Αξεσουάρ Κινητών",
"id": 35180,
"item_brand": "",
"quantity": 2
},
{
"item_id": 35181,
"item_name": "Blue Eagle BE-PBW-05 MagSafe Power Bank 3in1 with Built in Bracket 10000mAh White",
"sku": 35181,
"price": 35.9,
"stocklevel": 160,
"stockstatus": "instock",
"google_business_vertical": "retail",
"item_category": "Αξεσουάρ Κινητών",
"id": 35181,
"item_brand": "",
"quantity": 1
},
........
]
}
},
{
"gtm.start": 1782233199832,
"event": "gtm.js",
"gtm.uniqueEventId": 7
},
{
"ecommerce": {
"currency": "EUR",
"value": 233.99999999999997,
"items": [
{
"item_id": "000035180",
"item_name": "Blue Eagle BE-PBW-04 MagSafe Power Bank 3in1 with Built in Bracket 10000mAh White",
"sku": "000035180",
"price": 39.9,
"stocklevel": 4,
"stockstatus": "instock",
"google_business_vertical": "retail",
"item_category": "Αξεσουάρ Κινητών",
"id": "000035180",
"item_brand": "",
"quantity": 2
},....
]
},Also, another issue i have found is that in the add to cart event, the price is a string and so we get a
Meta warning in Events Manager that says “59% of price data has formatting issues” and affects ROAS calculation.{ "event": "add_to_cart", "ecommerce": { "currency": "EUR", "value": 35.9, "items": [ { "item_id": "000035181", "item_name": "Blue Eagle BE-PBW-05 MagSafe Power Bank 3in1 with Built in Bracket 10000mAh White", "sku": "000035181", "price": "35.90", "stocklevel": 160, "stockstatus": "instock", "google_business_vertical": "retail", "item_category": "Αξεσουάρ Κινητών", "id": "000035181", "item_brand": "", "item_variant": "", "quantity": 1 } ] },currently, you cannot find those issues in our website, because we have some custom snippets that fix both, but we can deactivate that for testing.
The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.