@codecademy/tracking 0.22.1-alpha.5bf38e.0 → 0.24.0-alpha.736afb.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.
@@ -1,4 +1,4 @@
1
- @codecademy/tracking:build: cache hit, replaying output 3a3593f939de2363
1
+ @codecademy/tracking:build: cache hit, replaying output e470679e5c731e04
2
2
  @codecademy/tracking:build: $ yarn build:clean && yarn build:compile && yarn build:types
3
3
  @codecademy/tracking:build: $ rm -rf dist
4
4
  @codecademy/tracking:build: $ babel ./src --out-dir ./dist --copy-files --extensions ".ts,.tsx"
@@ -7,5 +7,5 @@
7
7
  @codecademy/tracking:build: 
8
8
  @codecademy/tracking:build: Why you should do it regularly:
9
9
  @codecademy/tracking:build: https://github.com/browserslist/browserslist#browsers-data-updating
10
- @codecademy/tracking:build: Successfully compiled 18 files with Babel (1310ms).
10
+ @codecademy/tracking:build: Successfully compiled 18 files with Babel (1333ms).
11
11
  @codecademy/tracking:build: $ tsc --emitDeclarationOnly
package/CHANGELOG.md CHANGED
@@ -3,11 +3,21 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ### [0.22.1-alpha.5bf38e.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.22.0...@codecademy/tracking@0.22.1-alpha.5bf38e.0) (2022-05-19)
6
+ ## [0.24.0-alpha.736afb.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.23.0...@codecademy/tracking@0.24.0-alpha.736afb.0) (2022-08-22)
7
+
8
+
9
+ ### Features
10
+
11
+ * **tracking:** changing referrer type and allowing it into be set via a parameter ([e4a14aa](https://github.com/Codecademy/client-modules/commit/e4a14aa288d005c31c9fe6268c0638e6663eef29))
7
12
 
8
- **Note:** Version bump only for package @codecademy/tracking
9
13
 
10
14
 
15
+ ## [0.23.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.22.0...@codecademy/tracking@0.23.0) (2022-05-24)
16
+
17
+
18
+ ### Features
19
+
20
+ * **tracking:** :sparkles: Including field to track business seat data ([#46](https://github.com/Codecademy/client-modules/issues/46)) ([331893d](https://github.com/Codecademy/client-modules/commit/331893dd50b5bdbe861330b16744ae9f58d719be))
11
21
 
12
22
 
13
23
 
@@ -1,10 +1,10 @@
1
- import type { EventDataTypes, TrackingOptions, UserClickData, UserImpressionData, UserVisitData } from './types';
1
+ import type { BaseEventData, EventDataTypes, TrackingOptions, UserClickData, UserImpressionData, UserVisitData } from './types';
2
2
  export declare type TrackerOptions = {
3
3
  apiBaseUrl: string;
4
4
  verbose?: boolean;
5
5
  };
6
6
  export declare const createTracker: ({ apiBaseUrl, verbose }: TrackerOptions) => {
7
- event: <Category extends keyof EventDataTypes, Event_1 extends string & keyof EventDataTypes[Category], Data extends EventDataTypes[Category][Event_1]>(category: Category, event: Event_1, userData: Data, options?: TrackingOptions) => void;
7
+ event: <Category extends keyof EventDataTypes, Event_1 extends string & keyof EventDataTypes[Category], Data extends EventDataTypes[Category][Event_1] & BaseEventData>(category: Category, event: Event_1, userData: Data, options?: TrackingOptions) => void;
8
8
  click: (data: UserClickData) => void;
9
9
  impression: (data: UserImpressionData) => void;
10
10
  visit: (data: UserVisitData) => void;
@@ -72,7 +72,7 @@ export var createTracker = function createTracker(_ref) {
72
72
  path: window.location.pathname,
73
73
  title: window.document.title,
74
74
  url: window.location.href,
75
- referrer: window.document.referrer,
75
+ referrer: userData.referrer || window.document.referrer,
76
76
  client: getClientType()
77
77
  });
78
78
 
@@ -73,7 +73,7 @@ export declare type BaseEventData = {
73
73
  path?: null;
74
74
  title?: null;
75
75
  url?: null;
76
- referrer?: null;
76
+ referrer?: string | null;
77
77
  id?: null;
78
78
  };
79
79
  /**
@@ -172,24 +172,7 @@ export declare type UserClickData = UserSharedData & {
172
172
  container_slugs?: string[];
173
173
  search_id?: string;
174
174
  is_ugc?: boolean;
175
- account_manager_user_id?: string;
176
- removed_user_id?: string;
177
- plan_id?: string;
178
- plan_name?: string;
179
- business_seat_id?: string;
180
- business_seat_role?: string;
181
- business_seat_created_at?: string;
182
- plan_tier?: string;
183
- plan_start_date?: string;
184
- plan_end_date?: string;
185
- primary_plan?: boolean;
186
- plan_num_seats?: number;
187
- business_plan_type?: string;
188
- business_plan_tier?: string;
189
- business_organization_id?: string;
190
- business_organization_name?: string;
191
- business_plan_source?: string;
192
- business_plan_verified?: boolean;
175
+ business_user?: BaseEventAnyData;
193
176
  };
194
177
  /**
195
178
  * Data sent to user visit event table
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/tracking",
3
3
  "description": "Tracking library for Codecademy apps.",
4
- "version": "0.22.1-alpha.5bf38e.0",
4
+ "version": "0.24.0-alpha.736afb.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "module": "./dist/index.js",
7
7
  "main": "./dist/index.js",
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "838af0a96b26aa6740d185f0a7e3cd1cb8475344"
38
+ "gitHead": "34613a58dcb82bdb6f9150de442aaf3c9ee835da"
39
39
  }