@depict-ai/dpc 2.6.20 → 2.6.21

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/ES10/index.cjs CHANGED
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
17
17
  $parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
18
18
  $parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
19
19
  /*! Depict PerformanceClient */
20
- const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.20";
20
+ const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.21";
21
21
  let $405164bc961cc106$export$8ae64f3d447c14f7;
22
22
  (function (ProductCardType) {
23
23
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -191,7 +191,7 @@ class $89ae37e3a26189b4$export$820526014323765f {
191
191
  return false;
192
192
  }
193
193
  /**
194
- * Adds click and impression tracking to a product card
194
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
195
195
  */
196
196
  trackProductCard(card, tracking_id, type) {
197
197
  if (this.checkIfTracked(card)) return;
@@ -199,7 +199,15 @@ class $89ae37e3a26189b4$export$820526014323765f {
199
199
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).Recommendation:
200
200
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).SnakeRecommendation:
201
201
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
202
+ $9AWcE$depictaiutilishared.impression_track_element({
203
+ element: card,
204
+ data: {
205
+ recommendation_id: tracking_id,
206
+ ...$89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_getContextData, $89ae37e3a26189b4$var$_getContextData2).call(this)
207
+ }
208
+ });
202
209
  break;
210
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
203
211
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).SearchResult:
204
212
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
205
213
  break;
package/ES10/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.20";
1
+ export const version = "2.6.21";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
@@ -79,7 +79,7 @@ export class DPC {
79
79
  */
80
80
  checkIfTracked(element: HTMLElement): boolean;
81
81
  /**
82
- * Adds click and impression tracking to a product card
82
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
83
83
  */
84
84
  trackProductCard(card: HTMLElement, tracking_id: string, type: ProductCardType): void;
85
85
  /**
package/ES10/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $4uUHR$add_to_version_info, dlog as $4uUHR$dlog, derror as $4uUHR$derror, depict_click as $4uUHR$depict_click, foolproof_send_beacon as $4uUHR$foolproof_send_beacon, base_url as $4uUHR$base_url, observer as $4uUHR$observer, instant_exec_on_suspect_history_change as $4uUHR$instant_exec_on_suspect_history_change, catchify as $4uUHR$catchify, get_session_id as $4uUHR$get_session_id, get_tracking_event_context_data as $4uUHR$get_tracking_event_context_data, send_depict_unfiltered as $4uUHR$send_depict_unfiltered } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $4uUHR$add_to_version_info, dlog as $4uUHR$dlog, impression_track_element as $4uUHR$impression_track_element, derror as $4uUHR$derror, depict_click as $4uUHR$depict_click, foolproof_send_beacon as $4uUHR$foolproof_send_beacon, base_url as $4uUHR$base_url, observer as $4uUHR$observer, instant_exec_on_suspect_history_change as $4uUHR$instant_exec_on_suspect_history_change, catchify as $4uUHR$catchify, get_session_id as $4uUHR$get_session_id, get_tracking_event_context_data as $4uUHR$get_tracking_event_context_data, send_depict_unfiltered as $4uUHR$send_depict_unfiltered } from "@depict-ai/utilishared/ES10";
2
2
  import $4uUHR$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import $4uUHR$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
4
4
  import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
6
6
  /*! Depict PerformanceClient */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("performance-client", "ES10");
9
- const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.20";
9
+ const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.21";
10
10
  let $983195e3c4979825$export$8ae64f3d447c14f7;
11
11
  (function (ProductCardType) {
12
12
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -180,7 +180,7 @@ class $53af71a3700e1e90$export$820526014323765f {
180
180
  return false;
181
181
  }
182
182
  /**
183
- * Adds click and impression tracking to a product card
183
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
184
184
  */
185
185
  trackProductCard(card, tracking_id, type) {
186
186
  if (this.checkIfTracked(card)) return;
@@ -188,7 +188,15 @@ class $53af71a3700e1e90$export$820526014323765f {
188
188
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).Recommendation:
189
189
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).SnakeRecommendation:
190
190
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
191
+ $4uUHR$impression_track_element({
192
+ element: card,
193
+ data: {
194
+ recommendation_id: tracking_id,
195
+ ...$53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_getContextData, $53af71a3700e1e90$var$_getContextData2).call(this)
196
+ }
197
+ });
191
198
  break;
199
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
192
200
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).SearchResult:
193
201
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
194
202
  break;
package/dist/index.cjs CHANGED
@@ -17,7 +17,7 @@ function $parcel$interopDefault(a) {
17
17
  $parcel$export(module.exports, "DPC", () => $89ae37e3a26189b4$export$820526014323765f);
18
18
  $parcel$export(module.exports, "version", () => $fcc8287091fb489d$export$83d89fbfd8236492);
19
19
  /*! Depict PerformanceClient */
20
- const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.20";
20
+ const $fcc8287091fb489d$export$83d89fbfd8236492 = "2.6.21";
21
21
  let $405164bc961cc106$export$8ae64f3d447c14f7;
22
22
  (function (ProductCardType) {
23
23
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -191,7 +191,7 @@ class $89ae37e3a26189b4$export$820526014323765f {
191
191
  return false;
192
192
  }
193
193
  /**
194
- * Adds click and impression tracking to a product card
194
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
195
195
  */
196
196
  trackProductCard(card, tracking_id, type) {
197
197
  if (this.checkIfTracked(card)) return;
@@ -199,7 +199,15 @@ class $89ae37e3a26189b4$export$820526014323765f {
199
199
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).Recommendation:
200
200
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).SnakeRecommendation:
201
201
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
202
+ $9AWcE$depictaiutilishared.impression_track_element({
203
+ element: card,
204
+ data: {
205
+ recommendation_id: tracking_id,
206
+ ...$89ae37e3a26189b4$var$_classPrivateMethodGet(this, $89ae37e3a26189b4$var$_getContextData, $89ae37e3a26189b4$var$_getContextData2).call(this)
207
+ }
208
+ });
202
209
  break;
210
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
203
211
  case (0, $405164bc961cc106$export$8ae64f3d447c14f7).SearchResult:
204
212
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
205
213
  break;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.20";
1
+ export const version = "2.6.21";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
@@ -79,7 +79,7 @@ export class DPC {
79
79
  */
80
80
  checkIfTracked(element: HTMLElement): boolean;
81
81
  /**
82
- * Adds click and impression tracking to a product card
82
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
83
83
  */
84
84
  trackProductCard(card: HTMLElement, tracking_id: string, type: ProductCardType): void;
85
85
  /**
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $4uUHR$add_to_version_info, dlog as $4uUHR$dlog, derror as $4uUHR$derror, depict_click as $4uUHR$depict_click, foolproof_send_beacon as $4uUHR$foolproof_send_beacon, base_url as $4uUHR$base_url, observer as $4uUHR$observer, instant_exec_on_suspect_history_change as $4uUHR$instant_exec_on_suspect_history_change, catchify as $4uUHR$catchify, get_session_id as $4uUHR$get_session_id, get_tracking_event_context_data as $4uUHR$get_tracking_event_context_data, send_depict_unfiltered as $4uUHR$send_depict_unfiltered } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $4uUHR$add_to_version_info, dlog as $4uUHR$dlog, impression_track_element as $4uUHR$impression_track_element, derror as $4uUHR$derror, depict_click as $4uUHR$depict_click, foolproof_send_beacon as $4uUHR$foolproof_send_beacon, base_url as $4uUHR$base_url, observer as $4uUHR$observer, instant_exec_on_suspect_history_change as $4uUHR$instant_exec_on_suspect_history_change, catchify as $4uUHR$catchify, get_session_id as $4uUHR$get_session_id, get_tracking_event_context_data as $4uUHR$get_tracking_event_context_data, send_depict_unfiltered as $4uUHR$send_depict_unfiltered } from "@depict-ai/utilishared/ES10";
2
2
  import $4uUHR$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import $4uUHR$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
4
4
  import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
@@ -6,7 +6,7 @@ import $4uUHR$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpe
6
6
  /*! Depict PerformanceClient */
7
7
  import { register_es_version } from "../multi_import_deduplicator.mjs";
8
8
  register_es_version("performance-client", "ES10");
9
- const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.20";
9
+ const $3242b911de3d57ad$export$83d89fbfd8236492 = "2.6.21";
10
10
  let $983195e3c4979825$export$8ae64f3d447c14f7;
11
11
  (function (ProductCardType) {
12
12
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -180,7 +180,7 @@ class $53af71a3700e1e90$export$820526014323765f {
180
180
  return false;
181
181
  }
182
182
  /**
183
- * Adds click and impression tracking to a product card
183
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
184
184
  */
185
185
  trackProductCard(card, tracking_id, type) {
186
186
  if (this.checkIfTracked(card)) return;
@@ -188,7 +188,15 @@ class $53af71a3700e1e90$export$820526014323765f {
188
188
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).Recommendation:
189
189
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).SnakeRecommendation:
190
190
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
191
+ $4uUHR$impression_track_element({
192
+ element: card,
193
+ data: {
194
+ recommendation_id: tracking_id,
195
+ ...$53af71a3700e1e90$var$_classPrivateMethodGet(this, $53af71a3700e1e90$var$_getContextData, $53af71a3700e1e90$var$_getContextData2).call(this)
196
+ }
197
+ });
191
198
  break;
199
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
192
200
  case (0, $983195e3c4979825$export$8ae64f3d447c14f7).SearchResult:
193
201
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
194
202
  break;
package/latest/index.cjs CHANGED
@@ -11,7 +11,7 @@ function $parcel$export(e, n, v, s) {
11
11
  $parcel$export(module.exports, "DPC", () => $15e3eebad2263636$export$820526014323765f);
12
12
  $parcel$export(module.exports, "version", () => $9c6b4a5c4c4f318d$export$83d89fbfd8236492);
13
13
  /*! Depict PerformanceClient */
14
- const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.20";
14
+ const $9c6b4a5c4c4f318d$export$83d89fbfd8236492 = "2.6.21";
15
15
  let $02e69dba644a2ef8$export$8ae64f3d447c14f7;
16
16
  (function (ProductCardType) {
17
17
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -177,7 +177,7 @@ class $15e3eebad2263636$export$820526014323765f {
177
177
  return false;
178
178
  }
179
179
  /**
180
- * Adds click and impression tracking to a product card
180
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
181
181
  */
182
182
  trackProductCard(card, tracking_id, type) {
183
183
  if (this.checkIfTracked(card)) return;
@@ -185,7 +185,15 @@ class $15e3eebad2263636$export$820526014323765f {
185
185
  case (0, $02e69dba644a2ef8$export$8ae64f3d447c14f7).Recommendation:
186
186
  case (0, $02e69dba644a2ef8$export$8ae64f3d447c14f7).SnakeRecommendation:
187
187
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
188
+ $dwOGf$depictaiutilishared.impression_track_element({
189
+ element: card,
190
+ data: {
191
+ recommendation_id: tracking_id,
192
+ ...this.#getContextData()
193
+ }
194
+ });
188
195
  break;
196
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
189
197
  case (0, $02e69dba644a2ef8$export$8ae64f3d447c14f7).SearchResult:
190
198
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
191
199
  break;
package/latest/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "2.6.20";
1
+ export const version = "2.6.21";
2
2
  enum ProductCardType {
3
3
  Recommendation = 0,
4
4
  SnakeRecommendation = 1,
@@ -79,7 +79,7 @@ export class DPC {
79
79
  */
80
80
  checkIfTracked(element: HTMLElement): boolean;
81
81
  /**
82
- * Adds click and impression tracking to a product card
82
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
83
83
  */
84
84
  trackProductCard(card: HTMLElement, tracking_id: string, type: ProductCardType): void;
85
85
  /**
package/latest/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { add_to_version_info as $lbGMC$add_to_version_info, dlog as $lbGMC$dlog, instant_exec_on_suspect_history_change as $lbGMC$instant_exec_on_suspect_history_change, catchify as $lbGMC$catchify, get_session_id as $lbGMC$get_session_id, get_tracking_event_context_data as $lbGMC$get_tracking_event_context_data, derror as $lbGMC$derror, send_depict_unfiltered as $lbGMC$send_depict_unfiltered, depict_click as $lbGMC$depict_click, foolproof_send_beacon as $lbGMC$foolproof_send_beacon, base_url as $lbGMC$base_url, observer as $lbGMC$observer } from "@depict-ai/utilishared/latest";
1
+ import { add_to_version_info as $lbGMC$add_to_version_info, dlog as $lbGMC$dlog, instant_exec_on_suspect_history_change as $lbGMC$instant_exec_on_suspect_history_change, catchify as $lbGMC$catchify, get_session_id as $lbGMC$get_session_id, get_tracking_event_context_data as $lbGMC$get_tracking_event_context_data, impression_track_element as $lbGMC$impression_track_element, derror as $lbGMC$derror, send_depict_unfiltered as $lbGMC$send_depict_unfiltered, depict_click as $lbGMC$depict_click, foolproof_send_beacon as $lbGMC$foolproof_send_beacon, base_url as $lbGMC$base_url, observer as $lbGMC$observer } from "@depict-ai/utilishared/latest";
2
2
 
3
3
  /*! Depict PerformanceClient */
4
4
  import { register_es_version } from "../multi_import_deduplicator.mjs";
5
5
  register_es_version("performance-client", "latest");
6
- const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.20";
6
+ const $3b068891cefe570d$export$83d89fbfd8236492 = "2.6.21";
7
7
  let $ba8dc1a552d27224$export$8ae64f3d447c14f7;
8
8
  (function (ProductCardType) {
9
9
  ProductCardType[ProductCardType["Recommendation"] = 0] = "Recommendation";
@@ -169,7 +169,7 @@ class $fe563348936ab010$export$820526014323765f {
169
169
  return false;
170
170
  }
171
171
  /**
172
- * Adds click and impression tracking to a product card
172
+ * Adds click tracking to a product card, and impression tracking to recommendation cards
173
173
  */
174
174
  trackProductCard(card, tracking_id, type) {
175
175
  if (this.checkIfTracked(card)) return;
@@ -177,7 +177,15 @@ class $fe563348936ab010$export$820526014323765f {
177
177
  case (0, $ba8dc1a552d27224$export$8ae64f3d447c14f7).Recommendation:
178
178
  case (0, $ba8dc1a552d27224$export$8ae64f3d447c14f7).SnakeRecommendation:
179
179
  card.addEventListener("click", () => this.sendRecommendationClickEvent(tracking_id));
180
+ $lbGMC$impression_track_element({
181
+ element: card,
182
+ data: {
183
+ recommendation_id: tracking_id,
184
+ ...this.#getContextData()
185
+ }
186
+ });
180
187
  break;
188
+ // Search and listing impressions stay off: they'd be roughly 10x the recommendation volume.
181
189
  case (0, $ba8dc1a552d27224$export$8ae64f3d447c14f7).SearchResult:
182
190
  card.addEventListener("click", () => this.sendSearchResultClickEvent(tracking_id));
183
191
  break;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/depict-org/depict-ui.git",
6
6
  "directory": "browser-tags-v2/packages/performance-client"
7
7
  },
8
- "version": "2.6.20",
8
+ "version": "2.6.21",
9
9
  "packageManager": "yarn@3.2.2",
10
10
  "source": "./src/index.ts",
11
11
  "types": "ES10/index.d.ts",
@@ -97,8 +97,8 @@
97
97
  "@babel/plugin-transform-typescript": "^7.22.9",
98
98
  "@babel/runtime": "^7.22.6",
99
99
  "@babel/runtime-corejs3": "^7.22.6",
100
- "@depict-ai/types": "^5.6.16",
101
- "@depict-ai/utilishared": "^2.6.16"
100
+ "@depict-ai/types": "^5.6.17",
101
+ "@depict-ai/utilishared": "^2.6.17"
102
102
  },
103
103
  "main": "ES10/index.cjs",
104
104
  "module": "ES10/index.js"