mixpanel-browser 2.74.0 → 2.76.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/.claude/settings.local.json +3 -1
- package/.github/workflows/integration-tests.yml +2 -2
- package/.github/workflows/unit-tests.yml +3 -3
- package/CHANGELOG.md +15 -0
- package/README.md +2 -2
- package/build.sh +10 -8
- package/dist/async-modules/mixpanel-recorder-bIS4LMGd.js +23595 -0
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js +2 -0
- package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js.map +1 -0
- package/dist/async-modules/mixpanel-targeting-BcAPS-Mz.js +2520 -0
- package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js +2 -0
- package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js.map +1 -0
- package/dist/mixpanel-core.cjs.d.ts +68 -0
- package/dist/mixpanel-core.cjs.js +802 -337
- package/dist/mixpanel-recorder.js +828 -40
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-targeting.js +2520 -0
- package/dist/mixpanel-targeting.min.js +2 -0
- package/dist/mixpanel-targeting.min.js.map +1 -0
- package/dist/mixpanel-with-async-modules.cjs.d.ts +590 -0
- package/dist/mixpanel-with-async-modules.cjs.js +9867 -0
- package/dist/mixpanel-with-async-recorder.cjs.d.ts +68 -0
- package/dist/mixpanel-with-async-recorder.cjs.js +802 -337
- package/dist/mixpanel-with-recorder.d.ts +68 -0
- package/dist/mixpanel-with-recorder.js +1591 -343
- package/dist/mixpanel-with-recorder.min.d.ts +68 -0
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.d.ts +68 -0
- package/dist/mixpanel.amd.js +2124 -345
- package/dist/mixpanel.cjs.d.ts +68 -0
- package/dist/mixpanel.cjs.js +2124 -345
- package/dist/mixpanel.globals.js +802 -337
- package/dist/mixpanel.min.js +185 -175
- package/dist/mixpanel.module.d.ts +68 -0
- package/dist/mixpanel.module.js +2124 -345
- package/dist/mixpanel.umd.d.ts +68 -0
- package/dist/mixpanel.umd.js +2124 -345
- package/dist/rrweb-bundled.js +119 -5
- package/dist/rrweb-compiled.js +116 -5
- package/logo.svg +5 -0
- package/package.json +5 -3
- package/rollup.config.mjs +189 -40
- package/src/autocapture/index.js +10 -27
- package/src/config.js +9 -3
- package/src/flags/index.js +269 -9
- package/src/index.d.ts +68 -0
- package/src/loaders/loader-module.js +1 -0
- package/src/mixpanel-core.js +83 -109
- package/src/recorder/index.js +2 -1
- package/src/recorder/recorder.js +5 -1
- package/src/recorder/rrweb-network-plugin.js +649 -0
- package/src/recorder/session-recording.js +31 -11
- package/src/recorder-manager.js +216 -0
- package/src/request-batcher.js +1 -1
- package/src/targeting/event-matcher.js +42 -0
- package/src/targeting/index.js +11 -0
- package/src/targeting/loader.js +36 -0
- package/src/utils.js +14 -9
- package/testServer.js +55 -0
- /package/src/loaders/{loader-module-with-async-recorder.js → loader-module-with-async-modules.js} +0 -0
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"Bash(mkdir:*)",
|
|
5
5
|
"Bash(cat:*)",
|
|
6
6
|
"Bash(node --input-type=module -e \"import { expect } from 'chai'; console.log\\('works'\\);\":*)",
|
|
7
|
-
"Bash(BABEL_ENV=test node:*)"
|
|
7
|
+
"Bash(BABEL_ENV=test node:*)",
|
|
8
|
+
"Bash(npm test)",
|
|
9
|
+
"Bash(grep -E \"\\\\.\\(js|json\\)$\")"
|
|
8
10
|
],
|
|
9
11
|
"deny": [],
|
|
10
12
|
"ask": []
|
|
@@ -2,9 +2,9 @@ name: Unit Tests
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches: [master]
|
|
5
|
+
branches: [master, '**/*-rc']
|
|
6
6
|
pull_request:
|
|
7
|
-
branches: [master]
|
|
7
|
+
branches: [master, '**/*-rc']
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
build:
|
|
@@ -16,7 +16,7 @@ jobs:
|
|
|
16
16
|
|
|
17
17
|
strategy:
|
|
18
18
|
matrix:
|
|
19
|
-
node-version: [20.x, 22.x]
|
|
19
|
+
node-version: [20.x, 22.x, 24.x]
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- uses: actions/checkout@v4
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
**2.76.0** (18 Mar 2026)
|
|
2
|
+
- Added a new network plugin that captures network telemetry during session recordings.
|
|
3
|
+
- Added recording_event_triggers configuration option that allows starting a session recording when targeted events that meet specified property filters occur. Property filters are optional and use json-logic syntax, but this option is mainly intended to be used by remote settings (closed beta). Allows session replays to start on a trigger if a session replay is not already in progress. Does not affect any active recording sessions.
|
|
4
|
+
- Added mixpanel.enable() public method, complementing the existing disable() method. Re-enables tracking for some or all events after disable() has been called.
|
|
5
|
+
- Changed async bundles (e.g., mixpanel-recorder, mixpanel-targeting) loaded via CDN or loader-module-with-async-modules entry points to use hash-based file names for consistent versioning with the main SDK (e.g. mixpanel-recorder.min.js => mixpanel-recorder-bIS4LMGd.min.js). For customers who already proxy these files individually from the CDN, we recommend proxying everything under cdn.mxpnl.com/libs/* for reliability.
|
|
6
|
+
- Fixed event property matching in targeting to respect case sensitivity, consistent with how Mixpanel handles property names.
|
|
7
|
+
- Added dependency declaration for @mixpanel/rrweb-utils, a peer dependency of @mixpanel/rrweb-plugin-console-record. This was causing errors for users with strict peer dependencies enabled.
|
|
8
|
+
- Fixed an error thrown when disabling recording from remote settings and AbortController is not supported in the browser.
|
|
9
|
+
- Stabilized Safari simulator tests and ported remote settings tests to new test infrastructure.
|
|
10
|
+
|
|
11
|
+
**2.75.0** (24 Feb 2026)
|
|
12
|
+
- Adds support for Feature Flags targeting based on events tracked during the current session (Runtime Targeting)
|
|
13
|
+
- Fixes memory leaks in Session Recording on sites which create/destroy iframes
|
|
14
|
+
- Fixes usage of arrow functions in `hooks` config
|
|
15
|
+
|
|
1
16
|
**2.74.0** (27 Jan 2026)
|
|
2
17
|
- New session recording masking configuration options, including the ability to unmask inputs and allowlist-based selector masking.
|
|
3
18
|
- Adds initial support for the remote settings API, allowing remote configuration of SDK config options.
|
package/README.md
CHANGED
|
@@ -30,9 +30,9 @@ To load the core SDK with no option of session recording:
|
|
|
30
30
|
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-core';
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
To load the core SDK and optionally load session recording
|
|
33
|
+
To load the core SDK and optionally load session recording and targeting bundles asynchronously (via script tag):
|
|
34
34
|
```javascript
|
|
35
|
-
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-
|
|
35
|
+
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-modules';
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Use as a browser JavaScript module
|
package/build.sh
CHANGED
|
@@ -14,16 +14,18 @@ npx rollup -c rollup.config.mjs
|
|
|
14
14
|
|
|
15
15
|
ln -sf mixpanel.globals.js build/mixpanel.js
|
|
16
16
|
|
|
17
|
-
if [ ! -z "$FULL" ]; then
|
|
18
|
-
echo 'Bundling module-loader test runners'
|
|
19
|
-
npx webpack tests/module-cjs.js tests/module-cjs.bundle.js
|
|
20
|
-
npx browserify tests/module-es2015.js -t [ babelify --compact false ] --outfile tests/module-es2015.bundle.js
|
|
21
|
-
|
|
22
|
-
pushd examples/typescript; npm install && npm run build; popd
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
17
|
if [ ! -z "$DIST" ]; then
|
|
26
18
|
echo 'Copying to dist/'
|
|
27
19
|
rm -r dist
|
|
28
20
|
rsync -av --exclude='test' build/ dist/
|
|
21
|
+
|
|
22
|
+
# typescript examples require dist files
|
|
23
|
+
echo 'Building TypeScript examples'
|
|
24
|
+
pushd examples/typescript; npm install && npm run build; popd
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
if [ ! -z "$FULL" ]; then
|
|
28
|
+
echo 'Bundling module-loader test runners'
|
|
29
|
+
npx webpack tests/module-cjs.js tests/module-cjs.bundle.js
|
|
30
|
+
npx browserify tests/module-es2015.js -t [ babelify --compact false ] --outfile tests/module-es2015.bundle.js
|
|
29
31
|
fi
|