From cc14586ab8236c2f7095e5942ea7f5691a9a083a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20H=C3=B6hne?= Date: Thu, 18 Mar 2021 17:42:36 +0100 Subject: [PATCH] Adding the 'coupon' key to the item object Add the 'coupon' key to itemObj according to the example on https://developers.google.com/analytics/devguides/collection/ga4/ecommerce#begin_checkout --- template.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template.tpl b/template.tpl index 413b5cd..dd200dd 100644 --- a/template.tpl +++ b/template.tpl @@ -179,7 +179,8 @@ const mapProductData = i => { price: i.price, item_brand: i.brand, item_variant: i.variant, - quantity: i.quantity ? math.round(i.quantity) : i.quantity + quantity: i.quantity ? math.round(i.quantity) : i.quantity, + coupon: i.coupon }; category.forEach((c, i) => { if (i === 0) itemObj.item_category = c;