@codecademy/tracking 1.3.0-alpha.003b7e0dd5.0 → 1.3.0-alpha.20202942d5.0

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.
@@ -31,6 +31,7 @@ const getHashedContentId = async contentContext => {
31
31
  if (id) sum += id;
32
32
  return sum;
33
33
  }, '');
34
+ if (!contentIdsAsString) return;
34
35
  return hashStringSHA256(contentIdsAsString);
35
36
  };
36
37
  export const createTracker = _ref => {
@@ -266,10 +266,7 @@ export type ChatGPTPluginSearchEventData = {
266
266
  * Content context for tracking events
267
267
  */
268
268
  export type ContentContext = Partial<JourneyComponents & PathComponents & CourseComponents & ContentItem & Exercise & {
269
- content_item_id: string;
270
- exercise_id: string;
271
- } & {
272
- enterprise_module_id: string;
269
+ enterprise_module_id?: string;
273
270
  }>;
274
271
  export interface JourneyComponents {
275
272
  journey_id?: string;
@@ -288,6 +285,7 @@ export interface CourseComponents {
288
285
  }
289
286
  export interface ContentItem {
290
287
  content_item_id?: string;
288
+ type?: string;
291
289
  }
292
290
  export interface Exercise {
293
291
  exercise_id?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/tracking",
3
3
  "description": "Tracking library for Codecademy",
4
- "version": "1.3.0-alpha.003b7e0dd5.0",
4
+ "version": "1.3.0-alpha.20202942d5.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@qwik.dev/partytown": "0.11.0"