mixpanel-browser 2.75.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.
Files changed (57) hide show
  1. package/.claude/settings.local.json +14 -0
  2. package/.github/workflows/integration-tests.yml +2 -2
  3. package/.github/workflows/unit-tests.yml +2 -2
  4. package/CHANGELOG.md +10 -0
  5. package/build.sh +10 -8
  6. package/dist/async-modules/mixpanel-recorder-bIS4LMGd.js +23595 -0
  7. package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js +2 -0
  8. package/dist/async-modules/mixpanel-recorder-hFoTniVR.min.js.map +1 -0
  9. package/dist/async-modules/mixpanel-targeting-BcAPS-Mz.js +2520 -0
  10. package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js +2 -0
  11. package/dist/async-modules/mixpanel-targeting-VOeN7RWY.min.js.map +1 -0
  12. package/dist/mixpanel-core.cjs.d.ts +68 -0
  13. package/dist/mixpanel-core.cjs.js +550 -383
  14. package/dist/mixpanel-recorder.js +708 -32
  15. package/dist/mixpanel-recorder.min.js +1 -1
  16. package/dist/mixpanel-recorder.min.js.map +1 -1
  17. package/dist/mixpanel-targeting.js +6 -62
  18. package/dist/mixpanel-targeting.min.js +1 -1
  19. package/dist/mixpanel-targeting.min.js.map +1 -1
  20. package/dist/mixpanel-with-async-modules.cjs.d.ts +68 -0
  21. package/dist/mixpanel-with-async-modules.cjs.js +550 -383
  22. package/dist/mixpanel-with-async-recorder.cjs.d.ts +68 -0
  23. package/dist/mixpanel-with-async-recorder.cjs.js +550 -383
  24. package/dist/mixpanel-with-recorder.d.ts +68 -0
  25. package/dist/mixpanel-with-recorder.js +1036 -197
  26. package/dist/mixpanel-with-recorder.min.d.ts +68 -0
  27. package/dist/mixpanel-with-recorder.min.js +1 -1
  28. package/dist/mixpanel.amd.d.ts +68 -0
  29. package/dist/mixpanel.amd.js +1038 -251
  30. package/dist/mixpanel.cjs.d.ts +68 -0
  31. package/dist/mixpanel.cjs.js +1038 -251
  32. package/dist/mixpanel.globals.js +550 -383
  33. package/dist/mixpanel.min.js +184 -181
  34. package/dist/mixpanel.module.d.ts +68 -0
  35. package/dist/mixpanel.module.js +1038 -251
  36. package/dist/mixpanel.umd.d.ts +68 -0
  37. package/dist/mixpanel.umd.js +1038 -251
  38. package/logo.svg +5 -0
  39. package/package.json +2 -1
  40. package/rollup.config.mjs +163 -46
  41. package/src/autocapture/index.js +10 -27
  42. package/src/config.js +9 -3
  43. package/src/flags/index.js +1 -2
  44. package/src/index.d.ts +68 -0
  45. package/src/mixpanel-core.js +76 -111
  46. package/src/recorder/index.js +1 -1
  47. package/src/recorder/recorder.js +5 -1
  48. package/src/recorder/rrweb-network-plugin.js +649 -0
  49. package/src/recorder/session-recording.js +31 -11
  50. package/src/recorder-manager.js +216 -0
  51. package/src/request-batcher.js +1 -1
  52. package/src/targeting/event-matcher.js +2 -57
  53. package/src/targeting/index.js +1 -1
  54. package/src/targeting/loader.js +1 -1
  55. package/src/utils.js +13 -1
  56. package/testServer.js +55 -0
  57. package/src/globals.js +0 -14
@@ -0,0 +1,14 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(mkdir:*)",
5
+ "Bash(cat:*)",
6
+ "Bash(node --input-type=module -e \"import { expect } from 'chai'; console.log\\('works'\\);\":*)",
7
+ "Bash(BABEL_ENV=test node:*)",
8
+ "Bash(npm test)",
9
+ "Bash(grep -E \"\\\\.\\(js|json\\)$\")"
10
+ ],
11
+ "deny": [],
12
+ "ask": []
13
+ }
14
+ }
@@ -2,9 +2,9 @@ name: Integration 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:
@@ -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:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
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
+
1
11
  **2.75.0** (24 Feb 2026)
2
12
  - Adds support for Feature Flags targeting based on events tracked during the current session (Runtime Targeting)
3
13
  - Fixes memory leaks in Session Recording on sites which create/destroy iframes
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