posthog-js-lite 3.0.2 → 3.2.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 +20 -3
- package/README.md +5 -1
- package/lib/index.cjs.js +129 -124
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +27 -16
- package/lib/index.esm.js +129 -124
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +7 -4
- package/lib/posthog-core/src/types.d.ts +21 -13
- package/lib/posthog-web/src/storage.d.ts +1 -1
- package/lib/posthog-web/src/types.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# Next
|
|
2
|
+
|
|
3
|
+
# 3.2.0 - 2024-12-12
|
|
4
|
+
|
|
5
|
+
## Changed
|
|
6
|
+
|
|
7
|
+
1. Add new debugging property `$feature_flag_bootstrapped_response`, `$feature_flag_bootstrapped_payload` and `$used_bootstrap_value` to `$feature_flag_called` event
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# 3.1.0 - 2024-11-21
|
|
11
|
+
|
|
12
|
+
## Changed
|
|
13
|
+
|
|
14
|
+
1. chore: default `captureMode` changed to `json`.
|
|
15
|
+
1. To keep using the `form` mode, just set the `captureMode` option to `form` when initializing the PostHog client.
|
|
16
|
+
2. fix: identify method allows passing a $set_once object
|
|
17
|
+
|
|
1
18
|
# 3.0.2 - 2024-06-15
|
|
2
19
|
|
|
3
20
|
## Fixed
|
|
@@ -66,8 +83,8 @@
|
|
|
66
83
|
|
|
67
84
|
# 2.5.0 - 2023-12-04
|
|
68
85
|
|
|
69
|
-
1.
|
|
70
|
-
2.
|
|
86
|
+
1. Renamed `personProperties` to `setPersonPropertiesForFlags` to match `posthog-js` and more clearly indicated what it does
|
|
87
|
+
2. Renamed `groupProperties` to `setGroupPropertiesForFlags` to match `posthog-js` and more clearly indicated what it does
|
|
71
88
|
|
|
72
89
|
# 2.4.0 - 2023-04-20
|
|
73
90
|
|
|
@@ -98,4 +115,4 @@
|
|
|
98
115
|
|
|
99
116
|
# 2.0.1 - 2023-01-25
|
|
100
117
|
|
|
101
|
-
|
|
118
|
+
1. Ensures the distinctId used in `.groupIdentify` is the same as the currently identified user
|
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# PostHog Web
|
|
2
2
|
|
|
3
|
-
> 🚧 This is a
|
|
3
|
+
> 🚧 This is a reduced feature set package. Currently the only officially supported feature complete way of using PostHog on the web is [posthog-js](https://github.com/PostHog/posthog-js)
|
|
4
4
|
|
|
5
5
|
This package is currently published to npm as [posthog-js-lite](https://www.npmjs.com/package/posthog-js-lite) and is a simplified version of the recommended and offically supported `posthog-js`.
|
|
6
6
|
|
|
7
|
+
You'd want to use this only if you're very conscious about package sizes, and this reduced feature set (only analytics and feature flags) works for your use case. The most common use case is in chrome extensions.
|
|
8
|
+
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
```bash
|
|
@@ -27,6 +29,8 @@ posthog.capture('my-event', { myProperty: 'foo' })
|
|
|
27
29
|
|
|
28
30
|
// Identify a user (e.g. on login)
|
|
29
31
|
posthog.identify('my-unique-user-id', { email: 'exampke@posthog.com', name: 'Jane Doe' })
|
|
32
|
+
// ...or with Set Once additional properties
|
|
33
|
+
posthog.identify('my-unique-user-id', { $set: { email: 'exampke@posthog.com', name: 'Jane Doe' }, $set_once: { vip: true } })
|
|
30
34
|
|
|
31
35
|
// Reset a user (e.g. on logout)
|
|
32
36
|
posthog.reset()
|