diff --git a/docs/ConstructorIO.html b/docs/ConstructorIO.html index d2295973..e6297696 100644 --- a/docs/ConstructorIO.html +++ b/docs/ConstructorIO.html @@ -794,7 +794,7 @@
constructorio.tracker.trackRecommendationView(
{
+ items: [{ itemId: 'KMH876' }, { itemId: 'KMH140' }],
resultCount: 22,
resultPage: 2,
resultId: '019927c2-f955-4020-8b8d-6b21b93cb5a2',
@@ -9108,6 +9109,44 @@ Properties
+
+
+ items
+
+
+
+
+
+Array.<object>
+
+
+
+
+
+
+
+
+
+ <optional>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ List of Product Item objects
+
+
+
+
resultCount
@@ -13018,7 +13057,7 @@ Returns:
diff --git a/docs/modules_autocomplete.js.html b/docs/modules_autocomplete.js.html
index e70da147..d4a4c642 100644
--- a/docs/modules_autocomplete.js.html
+++ b/docs/modules_autocomplete.js.html
@@ -264,7 +264,7 @@ modules/autocomplete.js
diff --git a/docs/modules_browse.js.html b/docs/modules_browse.js.html
index bfde79c5..0f616736 100644
--- a/docs/modules_browse.js.html
+++ b/docs/modules_browse.js.html
@@ -630,7 +630,7 @@ modules/browse.js
diff --git a/docs/modules_catalog.js.html b/docs/modules_catalog.js.html
index 587c8b9f..5f8bd97b 100644
--- a/docs/modules_catalog.js.html
+++ b/docs/modules_catalog.js.html
@@ -3542,7 +3542,7 @@ modules/catalog.js
diff --git a/docs/modules_quizzes.js.html b/docs/modules_quizzes.js.html
index d17a9d62..2a3b713a 100644
--- a/docs/modules_quizzes.js.html
+++ b/docs/modules_quizzes.js.html
@@ -309,7 +309,7 @@ modules/quizzes.js
diff --git a/docs/modules_recommendations.js.html b/docs/modules_recommendations.js.html
index 143ac91c..cf9b7b47 100644
--- a/docs/modules_recommendations.js.html
+++ b/docs/modules_recommendations.js.html
@@ -291,7 +291,7 @@ modules/recommendations.js
diff --git a/docs/modules_search.js.html b/docs/modules_search.js.html
index 2fb9be73..7def99ed 100644
--- a/docs/modules_search.js.html
+++ b/docs/modules_search.js.html
@@ -426,7 +426,7 @@ modules/search.js
diff --git a/docs/modules_tasks.js.html b/docs/modules_tasks.js.html
index 9e442336..9da6cf95 100644
--- a/docs/modules_tasks.js.html
+++ b/docs/modules_tasks.js.html
@@ -231,7 +231,7 @@ modules/tasks.js
diff --git a/docs/modules_tracker.js.html b/docs/modules_tracker.js.html
index 56a477d4..caf6f868 100644
--- a/docs/modules_tracker.js.html
+++ b/docs/modules_tracker.js.html
@@ -1024,6 +1024,7 @@ modules/tracker.js
* @param {string} parameters.url - Current page URL
* @param {string} parameters.podId - Pod identifier
* @param {number} parameters.numResultsViewed - Number of results viewed
+ * @param {object[]} [parameters.items] - List of Product Item objects
* @param {number} [parameters.resultCount] - Total number of results
* @param {number} [parameters.resultPage] - Page number of results
* @param {string} [parameters.resultId] - Recommendation result identifier (returned in response from Constructor)
@@ -1046,6 +1047,7 @@ modules/tracker.js
* @example
* constructorio.tracker.trackRecommendationView(
* {
+ * items: [{ itemId: 'KMH876' }, { itemId: 'KMH140' }],
* resultCount: 22,
* resultPage: 2,
* resultId: '019927c2-f955-4020-8b8d-6b21b93cb5a2',
@@ -1080,6 +1082,7 @@ modules/tracker.js
podId = pod_id,
num_results_viewed,
numResultsViewed = num_results_viewed,
+ items,
} = parameters;
if (!helpers.isNil(resultCount)) {
@@ -1112,6 +1115,10 @@ modules/tracker.js
bodyParams.num_results_viewed = numResultsViewed;
}
+ if (items && Array.isArray(items)) {
+ bodyParams.items = items.slice(0, 100).map((item) => helpers.toSnakeCaseKeys(item, false));
+ }
+
const requestUrl = `${requestPath}${applyParamsAsString({}, userParameters, this.options)}`;
const requestMethod = 'POST';
const requestBody = applyParams(bodyParams, userParameters, { ...this.options, requestMethod });
@@ -1704,7 +1711,7 @@ modules/tracker.js
diff --git a/package-lock.json b/package-lock.json
index 54b9c48b..6f0ff4c7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@constructor-io/constructorio-node",
- "version": "4.6.7",
+ "version": "4.6.8",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@constructor-io/constructorio-node",
- "version": "4.6.7",
+ "version": "4.6.8",
"license": "MIT",
"dependencies": {
"form-data": "^4.0.0",
diff --git a/package.json b/package.json
index 1033bcde..ef748709 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@constructor-io/constructorio-node",
- "version": "4.6.7",
+ "version": "4.6.8",
"description": "Constructor.io Node.js client",
"main": "src/constructorio.js",
"types": "src/types/constructorio.d.ts",