@constructor-io/constructorio-client-javascript 2.33.3 → 2.33.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules/tracker.js +16 -2
- package/package.json +1 -1
package/lib/modules/tracker.js
CHANGED
|
@@ -1054,6 +1054,7 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
1054
1054
|
* @param {string} parameters.filter_name - Filter name
|
|
1055
1055
|
* @param {string} parameters.filter_value - Filter value
|
|
1056
1056
|
* @param {string} parameters.item_id - Product item unique identifier
|
|
1057
|
+
* @param {string} parameters.item_name - Product item name
|
|
1057
1058
|
* @param {string} [parameters.section="Products"] - Index section
|
|
1058
1059
|
* @param {string} [parameters.variation_id] - Product item variation unique identifier
|
|
1059
1060
|
* @param {string} [parameters.result_id] - Browse result identifier (returned in response from Constructor)
|
|
@@ -1102,7 +1103,10 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
1102
1103
|
selected_filters = parameters.selected_filters,
|
|
1103
1104
|
filter_name = parameters.filter_name,
|
|
1104
1105
|
filter_value = parameters.filter_value,
|
|
1105
|
-
item_id = parameters.item_id
|
|
1106
|
+
item_id = parameters.item_id,
|
|
1107
|
+
customer_id = parameters.customer_id,
|
|
1108
|
+
item_name = parameters.item_name,
|
|
1109
|
+
name = parameters.name;
|
|
1106
1110
|
|
|
1107
1111
|
if (section) {
|
|
1108
1112
|
bodyParams.section = section;
|
|
@@ -1144,10 +1148,20 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
1144
1148
|
|
|
1145
1149
|
if (filter_value) {
|
|
1146
1150
|
bodyParams.filter_value = filter_value;
|
|
1147
|
-
}
|
|
1151
|
+
} // Ensure support for both item_id and customer_id as parameters
|
|
1152
|
+
|
|
1148
1153
|
|
|
1149
1154
|
if (item_id) {
|
|
1150
1155
|
bodyParams.item_id = item_id;
|
|
1156
|
+
} else if (customer_id) {
|
|
1157
|
+
bodyParams.item_id = customer_id;
|
|
1158
|
+
} // Ensure support for both item_name and name as parameters
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
if (item_name) {
|
|
1162
|
+
bodyParams.item_name = item_name;
|
|
1163
|
+
} else if (name) {
|
|
1164
|
+
bodyParams.item_name = name;
|
|
1151
1165
|
}
|
|
1152
1166
|
|
|
1153
1167
|
var requestURL = "".concat(requestPath).concat(applyParamsAsString({}, this.options));
|