From 0d86e9a4a5fc5add1109cf5b1a8b9f020a862dcf Mon Sep 17 00:00:00 2001 From: Kostiantyn Horozhanov Date: Mon, 27 Nov 2023 19:43:17 +0100 Subject: [PATCH 1/2] content_type should not be set when items is undefined --- template.js | 2 +- template.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/template.js b/template.js index 0031f85..49cfbec 100644 --- a/template.js +++ b/template.js @@ -207,7 +207,7 @@ function addPropertiesData(eventData, mappedData) { mappedData.properties = {}; if (eventData.content_type) mappedData.properties.content_type = eventData.content_type; - else mappedData.properties.content_type = 'product'; + else if (eventData.items && eventData.items[0]) mappedData.properties.content_type = 'product'; if (eventData.currency) mappedData.properties.currency = eventData.currency; diff --git a/template.tpl b/template.tpl index b810540..e64ff87 100644 --- a/template.tpl +++ b/template.tpl @@ -773,7 +773,7 @@ function addPropertiesData(eventData, mappedData) { mappedData.properties = {}; if (eventData.content_type) mappedData.properties.content_type = eventData.content_type; - else mappedData.properties.content_type = 'product'; + else if (eventData.items && eventData.items[0]) mappedData.properties.content_type = 'product'; if (eventData.currency) mappedData.properties.currency = eventData.currency; From 09e4fdd8eb4393c5d0b07a3bfcca6184d7e0dbab Mon Sep 17 00:00:00 2001 From: Kostiantyn Horozhanov Date: Mon, 27 Nov 2023 19:44:32 +0100 Subject: [PATCH 2/2] Meta update --- metadata.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metadata.yaml b/metadata.yaml index 325a715..b8796d7 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,5 +1,7 @@ homepage: "https://stape.io/" versions: + - sha: 0d86e9a4a5fc5add1109cf5b1a8b9f020a862dcf + changeNotes: Content type fix. - sha: 552235408d50a3b7228d649e1437b0b0600da428 changeNotes: Added ability to generate _ttp cookie if not exists. - sha: f635ee4f83d084cc2328b0040fc6f5ca7a4bb6a1