mixpanel-browser 2.52.0 → 2.54.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.
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Mocha (Test single file)",
6
+ "type": "node",
7
+ "request": "launch",
8
+ "env": {
9
+ "BABEL_ENV": "test"
10
+ },
11
+ "runtimeArgs": [
12
+ "--require",
13
+ "babel-core/register",
14
+ "${workspaceRoot}/node_modules/.bin/mocha",
15
+ "--inspect-brk",
16
+ "${relativeFile}",
17
+ ],
18
+ "console": "integratedTerminal",
19
+ "internalConsoleOptions": "neverOpen",
20
+ "port": 9229
21
+ }
22
+ ]
23
+ }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ **2.54.0** (23 Jul 2024)
2
+ - Provides optional builds without session recording module and without asynchronous script loading.
3
+ - Integrates request batcher with session recording module for increased reliability.
4
+ - Improved user inactivity heuristic for session recording timeout.
5
+ - Adds config options to inline images and collect fonts during session recording.
6
+
7
+ **2.53.0** (21 Jun 2024)
8
+ - Switch to new session-recording network payload format, utilizing client-side compression when available
9
+ - Session-recording methods are now available through Google Tag Manager wrapper
10
+
11
+ **2.52.0** (7 Jun 2024)
12
+ - Reverted UTM param persistence change from 2.51.0: UTM parameters are again persisted by default
13
+
14
+ **2.51.0** (30 May 2024)
15
+ - UTM parameter properties are no longer persisted by default
16
+ - Existing superproperties persisted in localStorage are now copied back to cookie storage if the library is initialized with cookie persistence (support migrations from localStorage->cookie)
17
+ - Added session-recording options `record_block_class`, `record_block_selector`, and `record_mask_text_class`
18
+ - Added method `mixpanel.get_session_recording_properties()` for interop with other client-side SDKs
19
+
20
+ **2.50.0** (26 Apr 2024)
21
+ - Initial support for session recording
22
+
1
23
  **2.49.0** (5 Feb 2024)
2
24
  - SPA support in pageview-tracking
3
25
  - Support for configurable UTM parameter persistence
package/README.md CHANGED
@@ -23,6 +23,18 @@ mixpanel.init("YOUR_TOKEN");
23
23
  mixpanel.track("An event");
24
24
  ```
25
25
 
26
+ NOTE: the default `mixpanel-browser` bundle includes a bundled `mixpanel-recorder` SDK. We provide the following options to exclude `mixpanel-recorder` if you do not intend to use session replay or want to reduce bundle size:
27
+
28
+ To load the core SDK with no option of session recording:
29
+ ```javascript
30
+ import mixpanel from 'mixpanel-browser/src/loaders/loader-module-core';
31
+ ```
32
+
33
+ To load the core SDK and optionally load session recording bundle asynchronously (via script tag):
34
+ ```javascript
35
+ import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-recorder';
36
+ ```
37
+
26
38
  ## Alternative installation via Bower
27
39
  `mixpanel-js` is also available via front-end package manager [Bower](http://bower.io/). After installing Bower, fetch into your project's `bower_components` dir with:
28
40
  ```sh
package/build.sh CHANGED
@@ -27,6 +27,8 @@ if [ ! -z "$FULL" ]; then
27
27
  echo 'Building module bundles'
28
28
  npx rollup -i src/loaders/loader-module.js -f amd -o build/mixpanel.amd.js -c rollup.config.js
29
29
  npx rollup -i src/loaders/loader-module.js -f cjs -o build/mixpanel.cjs.js -c rollup.config.js
30
+ npx rollup -i src/loaders/loader-module-core.js -f cjs -o build/mixpanel-core.cjs.js -c rollup.config.js
31
+ npx rollup -i src/loaders/loader-module-with-async-recorder.js -f cjs -o build/mixpanel-with-async-recorder.cjs.js -c rollup.config.js
30
32
  npx rollup -i src/loaders/loader-module.js -f umd -o build/mixpanel.umd.js -n mixpanel -c rollup.config.js
31
33
 
32
34
  echo 'Bundling module-loader test runners'