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 @@
Returns:

diff --git a/docs/constructorio.js.html b/docs/constructorio.js.html index f9209f47..8777c51e 100644 --- a/docs/constructorio.js.html +++ b/docs/constructorio.js.html @@ -136,7 +136,7 @@

constructorio.js


diff --git a/docs/index.html b/docs/index.html index 4049c038..dd35aa10 100644 --- a/docs/index.html +++ b/docs/index.html @@ -110,7 +110,7 @@

Development / npm commands


diff --git a/docs/module-autocomplete.html b/docs/module-autocomplete.html index b61400ef..00d664ec 100644 --- a/docs/module-autocomplete.html +++ b/docs/module-autocomplete.html @@ -962,7 +962,7 @@
Returns:

diff --git a/docs/module-browse.html b/docs/module-browse.html index ec78c1ba..e35723b8 100644 --- a/docs/module-browse.html +++ b/docs/module-browse.html @@ -4767,7 +4767,7 @@
Returns:

diff --git a/docs/module-catalog.html b/docs/module-catalog.html index 4bffa563..eb48a57d 100644 --- a/docs/module-catalog.html +++ b/docs/module-catalog.html @@ -24586,7 +24586,7 @@
Returns:

diff --git a/docs/module-quizzes.html b/docs/module-quizzes.html index 9335341a..db25675e 100644 --- a/docs/module-quizzes.html +++ b/docs/module-quizzes.html @@ -1690,7 +1690,7 @@
Returns:

diff --git a/docs/module-recommendations.html b/docs/module-recommendations.html index 5d4be3ae..617db4f8 100644 --- a/docs/module-recommendations.html +++ b/docs/module-recommendations.html @@ -1229,7 +1229,7 @@
Returns:

diff --git a/docs/module-search.html b/docs/module-search.html index 24efea7b..9efa9508 100644 --- a/docs/module-search.html +++ b/docs/module-search.html @@ -2315,7 +2315,7 @@
Returns:

diff --git a/docs/module-tasks.html b/docs/module-tasks.html index 7eeaebfa..abe2fea5 100644 --- a/docs/module-tasks.html +++ b/docs/module-tasks.html @@ -996,7 +996,7 @@
Returns:

diff --git a/docs/module-tracker.html b/docs/module-tracker.html index b600703d..b1672118 100644 --- a/docs/module-tracker.html +++ b/docs/module-tracker.html @@ -153,7 +153,7 @@

(inn
Source:
@@ -1254,7 +1254,7 @@

Source:
@@ -2382,7 +2382,7 @@

Source:
@@ -4564,7 +4564,7 @@

Source:
@@ -7727,7 +7727,7 @@

Source:
@@ -8901,6 +8901,7 @@
Example
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:

- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:35 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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


- Documentation generated by JSDoc 4.0.2 on Thu Aug 10 2023 16:04:18 GMT-0400 (Eastern Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Mon Aug 14 2023 14:51:34 GMT-0400 (Eastern Daylight Time) using the docdash theme.
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",