@constructor-io/constructorio-client-javascript 2.53.0 → 2.53.1

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.
@@ -438,6 +438,7 @@ var Tracker = /*#__PURE__*/function () {
438
438
  * @param {string} parameters.userInput - The current autocomplete search query
439
439
  * @param {string} [parameters.groupId] - Group identifier of selected item
440
440
  * @param {string} [parameters.section] - The section name for the item Ex. "Products"
441
+ * @param {object} [parameters.analyticsTags] - Pass additional analytics data
441
442
  * @param {object} [networkParameters] - Parameters relevant to the network request
442
443
  * @param {number} [networkParameters.timeout] - Request timeout (in milliseconds)
443
444
  * @returns {(true|Error)}
@@ -469,7 +470,9 @@ var Tracker = /*#__PURE__*/function () {
469
470
  group_id = parameters.group_id,
470
471
  _parameters$groupId3 = parameters.groupId,
471
472
  groupId = _parameters$groupId3 === void 0 ? group_id : _parameters$groupId3,
472
- section = parameters.section;
473
+ section = parameters.section,
474
+ _parameters$analytics2 = parameters.analyticsTags,
475
+ analyticsTags = _parameters$analytics2 === void 0 ? null : _parameters$analytics2;
473
476
  var queryParams = {};
474
477
  var bodyParams = {
475
478
  user_input: userInput,
@@ -484,6 +487,9 @@ var Tracker = /*#__PURE__*/function () {
484
487
  if (section) {
485
488
  queryParams.section = section;
486
489
  }
490
+ if (analyticsTags) {
491
+ bodyParams.analytics_tags = analyticsTags;
492
+ }
487
493
  var requestURL = "".concat(baseUrl).concat(applyParamsAsString(queryParams, this.options));
488
494
  var requestMethod = 'POST';
489
495
  var requestBody = applyParams(bodyParams, _objectSpread(_objectSpread({}, this.options), {}, {
@@ -58,6 +58,19 @@ declare class Tracker {
58
58
  networkParameters?: NetworkParameters
59
59
  ): true | Error;
60
60
 
61
+ trackSearchSubmitV2(
62
+ term: string,
63
+ parameters: {
64
+ originalQuery: string;
65
+ groupId?: string;
66
+ displayName?: string;
67
+ section?: string;
68
+ userInput: string;
69
+ analyticsTags?: Record<string, string>;
70
+ },
71
+ networkParameters?: NetworkParameters
72
+ ): true | Error;
73
+
61
74
  trackSearchResultsLoadedV2(
62
75
  term: string,
63
76
  parameters: {
package/lib/version.js CHANGED
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = '2.53.0';
7
+ var _default = '2.53.1';
8
8
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.53.0",
3
+ "version": "2.53.1",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",