@codecademy/tracking 0.16.0-alpha.d31da7.0 → 0.17.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.
- package/CHANGELOG.md +61 -2
- package/dist/events/track.js +6 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,71 @@
|
|
|
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.
|
|
6
|
+
## [0.17.0](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.16.1...@codecademy/tracking@0.17.0) (2021-11-30)
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **eslint-config:** bump ESLint to 8 and typescript-eslint to 5 (#4)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **eslint-config:** bump ESLint to 8 and typescript-eslint to 5 ([#4](https://github.com/Codecademy/client-modules/issues/4)) ([64423d6](https://github.com/Codecademy/client-modules/commit/64423d69ad0f90f2e717373db6b1988b715681cc))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### [0.16.1](https://github.com/Codecademy/client-modules/compare/@codecademy/tracking@0.16.0...@codecademy/tracking@0.16.1) (2021-11-12)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **tracking:** super-bind the sendBeacon to navigator ([b32a8ec](https://github.com/Codecademy/client-modules/commit/b32a8ece14b2c2d62abf98f762f1be17690406f8))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 0.16.0 (2021-11-10)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### ⚠ BREAKING CHANGES
|
|
32
|
+
|
|
33
|
+
* prepended OneTrust to tracking integrations loads
|
|
34
|
+
* clean up tracker and remove auth token
|
|
35
|
+
|
|
9
36
|
### Features
|
|
10
37
|
|
|
11
|
-
* **tracking:**
|
|
38
|
+
* **tracking:** Add source tracking for PWA ([32321cc](https://github.com/Codecademy/client-modules/commit/32321cc489dfd2ada1d967ad6630e849ddebd6e6))
|
|
39
|
+
* **tracking:** ignore known client failures in fetching destinations ([#2](https://github.com/Codecademy/client-modules/issues/2)) ([432549d](https://github.com/Codecademy/client-modules/commit/432549df9b556672eb9b3a321a90d37dd1009b09))
|
|
40
|
+
* add user impression to tracking ([3ec4f61](https://github.com/Codecademy/client-modules/commit/3ec4f6113350859b9d792467ca29b01e0855b4a4))
|
|
41
|
+
* bump ESLint configs to latest ([3a403c0](https://github.com/Codecademy/client-modules/commit/3a403c01358f8b4a0d10d99f8d57e1979ebce189))
|
|
42
|
+
* **event type:** adding business reporting types ([d4a0243](https://github.com/Codecademy/client-modules/commit/d4a0243b6380666850ef0f4bcfcd3c80a065d011)), closes [/github.com/codecademy-engineering/business-reporting/blob/develop/src/util/eventTracking/index.tsx#L104-L110](https://github.com/Codecademy//github.com/codecademy-engineering/business-reporting/blob/develop/src/util/eventTracking/index.tsx/issues/L104-L110)
|
|
43
|
+
* **tracking:** Add a fullstory boolean to TrackingOptions type ([4433669](https://github.com/Codecademy/client-modules/commit/443366955e8beb6aca3337841bf70c583df89f5f))
|
|
44
|
+
* **tracking:** Add a new page_career_path_visited event ([#1283](https://github.com/Codecademy/client-modules/issues/1283)) ([1228399](https://github.com/Codecademy/client-modules/commit/12283990e0bfa0d8d03fb78c83c84cab318e68b1))
|
|
45
|
+
* **tracking:** Added repo-tracking to user events ([d8a72f1](https://github.com/Codecademy/client-modules/commit/d8a72f19afbb02ba6d0aeef7a6b4b2b55820f111))
|
|
46
|
+
* **tracking:** Record the page referrer for every event. ([da11524](https://github.com/Codecademy/client-modules/commit/da11524588571f2ce44bd9af4486b9b64b66408c))
|
|
47
|
+
* **tracking:** Update business event name ([8babbf9](https://github.com/Codecademy/client-modules/commit/8babbf98dad5deb25782aa5b72229c2fea1a6c88))
|
|
48
|
+
* add container_slugs to UserClickData tracking type ([0a70fec](https://github.com/Codecademy/client-modules/commit/0a70fec80c88833bfad73728ae4a52cd54dc659e))
|
|
49
|
+
* added useTrackingIntegrations to tracking package ([b93ca89](https://github.com/Codecademy/client-modules/commit/b93ca897634c62a8d6defb6f6b426395d2daf9f0))
|
|
50
|
+
* clean up tracker and remove auth token ([7d98f82](https://github.com/Codecademy/client-modules/commit/7d98f82f64e48984e0913de83aea0635e93b21d9))
|
|
51
|
+
* Creating the @codecademy/tracking pachage. ([eb2cdca](https://github.com/Codecademy/client-modules/commit/eb2cdca0f1ecf2f77035ffac39e4c7cbe956bed2))
|
|
52
|
+
* onboarded eslint-plugin-simple-import-sort into ESLint plugin ([5eac76b](https://github.com/Codecademy/client-modules/commit/5eac76b95f547f0457360c8f7428af17152d1d67))
|
|
53
|
+
* prepended OneTrust to tracking integrations loads ([9c2e18e](https://github.com/Codecademy/client-modules/commit/9c2e18e35f3f3f538dc3727f4efdde3521708b6c))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* Add a runtime dependency ([436c3fb](https://github.com/Codecademy/client-modules/commit/436c3fba8812d6f74181de57dca9e8750e371760))
|
|
59
|
+
* Add query params to tracking calls ([#1189](https://github.com/Codecademy/client-modules/issues/1189)) ([6611839](https://github.com/Codecademy/client-modules/commit/661183985d81ca4f75cdfb39a4514f4d7f287d8d))
|
|
60
|
+
* allow no user for tracking integrations ([#1726](https://github.com/Codecademy/client-modules/issues/1726)) ([fa31842](https://github.com/Codecademy/client-modules/commit/fa318421ea2396497bf80fe69ba56063330dd0ed))
|
|
61
|
+
* bump tracking package babel-preset-codecademy to latest ([5c66f67](https://github.com/Codecademy/client-modules/commit/5c66f67c2833993a0dbd6b2e9441b3e590225437))
|
|
62
|
+
* business reporting event types ([2d9fb8e](https://github.com/Codecademy/client-modules/commit/2d9fb8e62d078aed0721df4afae775de2832733f))
|
|
63
|
+
* support navigator.sendBeacon not existing ([79b94cc](https://github.com/Codecademy/client-modules/commit/79b94cc0c140da083a770527a7cf4622c6578a97))
|
|
64
|
+
* switch tracking 'verbose' type back to boolean ([913c870](https://github.com/Codecademy/client-modules/commit/913c8703fb6a06363b324940d7ee406f839e4b53))
|
|
65
|
+
* use old style existence check for navigator.sendBeacon ([f0bf309](https://github.com/Codecademy/client-modules/commit/f0bf30947aa6edb767cab500480a0a71ca147d39))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Reverts
|
|
69
|
+
|
|
70
|
+
* Revert "feat(tracking): Add a fullstory boolean to TrackingOptions type" (#1381) ([376df52](https://github.com/Codecademy/client-modules/commit/376df52daec85208bbaf28760c5fd6bfa5e52810)), closes [#1381](https://github.com/Codecademy/client-modules/issues/1381)
|
|
12
71
|
|
|
13
72
|
|
|
14
73
|
|
package/dist/events/track.js
CHANGED
|
@@ -28,8 +28,6 @@ export var createTracker = function createTracker(_ref) {
|
|
|
28
28
|
verbose = _ref.verbose;
|
|
29
29
|
|
|
30
30
|
var beacon = function beacon(endpoint, data) {
|
|
31
|
-
var _navigator$sendBeacon, _navigator;
|
|
32
|
-
|
|
33
31
|
var uri = new URL(endpoint, apiBaseUrl).toString();
|
|
34
32
|
var form = new FormData();
|
|
35
33
|
|
|
@@ -44,7 +42,12 @@ export var createTracker = function createTracker(_ref) {
|
|
|
44
42
|
} // Firefox allows users to disable navigator.sendBeacon, and very old Safari versions don't have it.
|
|
45
43
|
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
var sendBeacon = // [WEB-1700]: Additionally, Chrome 79-80 gives "Illegal invocation" with ?., so through 2022 we should support them.
|
|
46
|
+
// It seems similar to this: https://github.com/vercel/next.js/issues/23856
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
48
|
+
navigator.sendBeacon && navigator.sendBeacon.bind(navigator);
|
|
49
|
+
|
|
50
|
+
if (sendBeacon !== null && sendBeacon !== void 0 && sendBeacon(uri, form)) {
|
|
48
51
|
return;
|
|
49
52
|
} // Either way, we fall back to standard fetch if sendBeacon fails.
|
|
50
53
|
// We don't mind this rejecting with an error because it's tracking, and we'll know if that starts to fail.
|
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.
|
|
4
|
+
"version": "0.17.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@babel/cli": "^7.13.10",
|
|
17
17
|
"@types/fetch-mock": "^7.3.3",
|
|
18
18
|
"@types/jest": "^26.0.15",
|
|
19
|
-
"babel-preset-codecademy": "^
|
|
19
|
+
"babel-preset-codecademy": "^6.0.0",
|
|
20
20
|
"fetch-mock": "^9.11.0",
|
|
21
21
|
"jest-fetch-mock": "^3.0.3",
|
|
22
22
|
"ts-jest": "^26.4.1",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1d1819c91a8dcf95bbbb48bc1e297c23de374420"
|
|
40
40
|
}
|