mixpanel-browser 2.53.0 → 2.54.1
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/.vscode/launch.json +23 -0
- package/CHANGELOG.md +9 -0
- package/README.md +12 -0
- package/build.sh +2 -0
- package/dist/mixpanel-core.cjs.js +6369 -0
- package/dist/mixpanel-recorder.js +982 -109
- package/dist/mixpanel-recorder.min.js +9 -9
- package/dist/mixpanel-with-async-recorder.cjs.js +6371 -0
- package/dist/mixpanel.amd.js +5333 -519
- package/dist/mixpanel.cjs.js +5333 -519
- package/dist/mixpanel.globals.js +166 -114
- package/dist/mixpanel.min.js +108 -108
- package/dist/mixpanel.umd.js +5333 -519
- package/package.json +1 -2
- package/rollup.config.js +3 -3
- package/src/config.js +1 -1
- package/src/loaders/bundle-loaders.js +22 -0
- package/src/loaders/loader-globals.js +2 -1
- package/src/loaders/loader-module-core.js +7 -0
- package/src/loaders/loader-module-with-async-recorder.js +7 -0
- package/src/loaders/loader-module.js +4 -1
- package/src/mixpanel-core.js +18 -11
- package/src/recorder/index.js +129 -37
- package/src/request-batcher.js +24 -13
- package/src/request-queue.js +112 -88
|
@@ -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,12 @@
|
|
|
1
|
+
**2.54.1** (30 Jul 2024)
|
|
2
|
+
- Fixes and improvements for user-idleness detection in session recording
|
|
3
|
+
|
|
4
|
+
**2.54.0** (23 Jul 2024)
|
|
5
|
+
- Provides optional builds without session recording module and without asynchronous script loading.
|
|
6
|
+
- Integrates request batcher with session recording module for increased reliability.
|
|
7
|
+
- Improved user inactivity heuristic for session recording timeout.
|
|
8
|
+
- Adds config options to inline images and collect fonts during session recording.
|
|
9
|
+
|
|
1
10
|
**2.53.0** (21 Jun 2024)
|
|
2
11
|
- Switch to new session-recording network payload format, utilizing client-side compression when available
|
|
3
12
|
- Session-recording methods are now available through Google Tag Manager wrapper
|
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'
|