From 2d0124fcee5e67226e7f3f1d53a947289199459d Mon Sep 17 00:00:00 2001 From: Cristian Longo Date: Tue, 19 Oct 2021 16:54:14 +0300 Subject: [PATCH] Product specifications on productView event --- CHANGELOG.md | 2 ++ react/components/ProductTitleAndPixel.tsx | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6b156e1..6868fc1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Pass product specifications on `productView` event ## [2.120.1] - 2021-08-31 ### Fixed diff --git a/react/components/ProductTitleAndPixel.tsx b/react/components/ProductTitleAndPixel.tsx index 7f9303a6..04c7c823 100644 --- a/react/components/ProductTitleAndPixel.tsx +++ b/react/components/ProductTitleAndPixel.tsx @@ -25,6 +25,12 @@ interface Product { metaTagDescription: string productReference: string items: SKU[] + properties: ProductProperties[] +} + +interface ProductProperties { + name: string + values: string[] } interface ProductViewEvent { @@ -40,6 +46,7 @@ interface ProductViewEvent { productName: string items: SKUEvent[] selectedSku: SKUEvent + properties: ProductProperties[] } interface Category { @@ -161,6 +168,7 @@ function useProductEvents({ productName: product.productName, items: product.items.map(getSkuProperties), selectedSku: getSkuProperties(selectedItem), + properties: product.properties } return [