From f1d50395923f8a7191a2a0bdc869671d5dd2dbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20S=C4=99k?= Date: Fri, 23 Jun 2023 13:42:32 +0200 Subject: [PATCH 1/3] PPTT-4090 Added to ecommerce products optional "customDimensions" attribute --- .../web/javascript_tracking_client/api.rst | 89 ++++++++++++++++--- 1 file changed, 75 insertions(+), 14 deletions(-) diff --git a/data_collection/web/javascript_tracking_client/api.rst b/data_collection/web/javascript_tracking_client/api.rst index 37ddb0ff..694ccda1 100644 --- a/data_collection/web/javascript_tracking_client/api.rst +++ b/data_collection/web/javascript_tracking_client/api.rst @@ -281,6 +281,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") + * customDimensions - **Optional** [object] Product custom dimentions (default: {}) Example of usage: @@ -299,7 +300,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }] ]); @@ -314,7 +319,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }]); .. _jtc-api-ecommerceAddToCart: @@ -332,6 +341,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") + * customDimensions - **Optional** [object] Product custom dimentions (default: {}) Example of usage: @@ -350,7 +360,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }] ]); @@ -365,7 +379,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }]); .. _jtc-api-ecommerceRemoveFromCart: @@ -383,6 +401,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") + * customDimensions - **Optional** [object] Product custom dimentions (default: {}) Example of usage: @@ -401,7 +420,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }] ]); @@ -416,7 +439,11 @@ E-commerce v2 price: "49.90", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }]); .. _jtc-api-ecommerceCartUpdate: @@ -434,6 +461,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") + * customDimensions - **Optional** [object] Product custom dimentions (default: {}) :param number grandTotal: **Required** [number|string] The total value of items in a cart has to be a float number or a string containing float number representation @@ -455,7 +483,11 @@ E-commerce v2 price: "50.00", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }, { sku: "craft-312", @@ -464,7 +496,11 @@ E-commerce v2 price: "30.00", quantity: 1, brand: "DMZ", - variant: "red" + variant: "red", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } } ], "180.00" @@ -483,7 +519,11 @@ E-commerce v2 price: "50.00", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }, { sku: "craft-312", @@ -492,7 +532,11 @@ E-commerce v2 price: "30.00", quantity: 1, brand: "DMZ", - variant: "red" + variant: "red", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } } ], "180.00" @@ -513,6 +557,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") + * customDimensions - **Optional** [object] Product custom dimentions (default: {}) :param object paymentInformation: Total payment information about products in a cart. Expected attributes: @@ -541,7 +586,11 @@ E-commerce v2 price: "50.00", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }, { sku: "craft-312", @@ -550,7 +599,11 @@ E-commerce v2 price: "30.00", quantity: 1, brand: "DMZ", - variant: "red" + variant: "red", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } } ], { @@ -576,7 +629,11 @@ E-commerce v2 price: "50.00", quantity: 3, brand: "DMZ", - variant: "blue" + variant: "blue", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } }, { sku: "craft-312", @@ -585,7 +642,11 @@ E-commerce v2 price: "30.00", quantity: 1, brand: "DMZ", - variant: "red" + variant: "red", + customDimensions: { + 1: 'coupon-2020', + 2: '20%' + } } ], { From f79cd1e6389a3736570393d9bf3718569434a743 Mon Sep 17 00:00:00 2001 From: RomanSek Date: Tue, 25 Jul 2023 15:56:44 +0200 Subject: [PATCH 2/3] Update data_collection/web/javascript_tracking_client/api.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adam MusiaƂ --- data_collection/web/javascript_tracking_client/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_collection/web/javascript_tracking_client/api.rst b/data_collection/web/javascript_tracking_client/api.rst index 694ccda1..9432a2d6 100644 --- a/data_collection/web/javascript_tracking_client/api.rst +++ b/data_collection/web/javascript_tracking_client/api.rst @@ -281,7 +281,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) Example of usage: From 6b59fd97beee39d9a099c2a82ce693a597a62b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20S=C4=99k?= Date: Fri, 28 Jul 2023 09:12:42 +0200 Subject: [PATCH 3/3] PPTT-4090 Typo fix --- data_collection/web/javascript_tracking_client/api.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data_collection/web/javascript_tracking_client/api.rst b/data_collection/web/javascript_tracking_client/api.rst index 694ccda1..159cf7f1 100644 --- a/data_collection/web/javascript_tracking_client/api.rst +++ b/data_collection/web/javascript_tracking_client/api.rst @@ -281,7 +281,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) Example of usage: @@ -341,7 +341,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) Example of usage: @@ -401,7 +401,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) Example of usage: @@ -461,7 +461,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) :param number grandTotal: **Required** [number|string] The total value of items in a cart has to be a float number or a string containing float number representation @@ -557,7 +557,7 @@ E-commerce v2 * quantity - **Optional** [number|string] Product quantity has to be an integer number or a string containing integer representation (default: 1) * brand - **Optional** [string] Product brand (default: "") * variant - **Optional** [string] Product variant (default: "") - * customDimensions - **Optional** [object] Product custom dimentions (default: {}) + * customDimensions - **Optional** [object] Product custom dimensions (default: {}) :param object paymentInformation: Total payment information about products in a cart. Expected attributes: