@reservamos/browser-analytics 1.0.14 → 1.0.22-alpha.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 +12 -0
- package/dist/browser-analytics.cjs +3 -3
- package/dist/browser-analytics.cjs.map +1 -1
- package/dist/browser-analytics.d.ts +13 -0
- package/dist/browser-analytics.esm.js +536 -431
- package/dist/browser-analytics.esm.js.map +1 -1
- package/dist/browser-analytics.iife.js +3 -3
- package/dist/browser-analytics.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/events/geolocationSelected/geolocationSelectedSchema.ts +13 -0
- package/src/events/geolocationSelected/index.ts +7 -0
- package/src/events/geolocationSelected/trackGeolocationSelected.ts +21 -0
- package/src/index.ts +4 -0
- package/src/init.ts +2 -2
- package/src/services/fingerprint.ts +4 -0
- package/src/services/geolocation.test.ts +261 -0
- package/src/services/geolocation.ts +270 -24
- package/src/services/mixpanel.ts +13 -0
- package/src/services/validator/validator.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
- Improve geolocation tracking with full Mixpanel profile sync via `setPeopleProperties`.
|
|
6
|
+
- Add `Geolocation Status` (`granted`, `denied`, `error`, `skipped_cache`) to the `Geolocation Requested` event and user profile.
|
|
7
|
+
- Add `Geolocation Updated At`, `Geolocation Accuracy`, and `Geolocation Error Code` to the `Geolocation Requested` event for traceability.
|
|
8
|
+
- Include `$latitude` and `$longitude` on the user profile when coordinates are available.
|
|
9
|
+
- Persist geolocation cache in `localStorage` with runtime validation and safe storage access.
|
|
10
|
+
- Request high-accuracy coordinates (`enableHighAccuracy`, fresh position, 10s timeout).
|
|
11
|
+
- Initialize geolocation after Mixpanel to avoid losing telemetry on first load.
|
|
12
|
+
- Add unit tests for granted, denied, error, skipped cache, and malformed cache scenarios.
|
|
13
|
+
- Add `Geolocation Selected` event with `Selected City` and `Selected Country Code` properties, synced to the Mixpanel user profile.
|
|
14
|
+
|
|
3
15
|
## 0.2.0
|
|
4
16
|
|
|
5
17
|
- Breaking Change: Import individual init, track and identify functions is no longer available.
|