Skip to content

Commit

Permalink
Merge pull request #211 from mixpanel/2.54.0-rc
Browse files Browse the repository at this point in the history
2.54.0 rc
  • Loading branch information
tdumitrescu authored Jul 23, 2024
2 parents 5701b2b + e1b1a7c commit 319b2b1
Show file tree
Hide file tree
Showing 32 changed files with 52,382 additions and 3,312 deletions.
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Mocha (Test single file)",
"type": "node",
"request": "launch",
"env": {
"BABEL_ENV": "test"
},
"runtimeArgs": [
"--require",
"babel-core/register",
"${workspaceRoot}/node_modules/.bin/mocha",
"--inspect-brk",
"${relativeFile}",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
**2.54.0** (23 Jul 2024)
- Provides optional builds without session recording module and without asynchronous script loading.
- Integrates request batcher with session recording module for increased reliability.
- Improved user inactivity heuristic for session recording timeout.
- Adds config options to inline images and collect fonts during session recording.

**2.53.0** (21 Jun 2024)
- Switch to new session-recording network payload format, utilizing client-side compression when available
- Session-recording methods are now available through Google Tag Manager wrapper
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ mixpanel.init("YOUR_TOKEN");
mixpanel.track("An event");
```

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:

To load the core SDK with no option of session recording:
```javascript
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-core';
```

To load the core SDK and optionally load session recording bundle asynchronously (via script tag):
```javascript
import mixpanel from 'mixpanel-browser/src/loaders/loader-module-with-async-recorder';
```

## Alternative installation via Bower
`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:
```sh
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if [ ! -z "$FULL" ]; then
echo 'Building module bundles'
npx rollup -i src/loaders/loader-module.js -f amd -o build/mixpanel.amd.js -c rollup.config.js
npx rollup -i src/loaders/loader-module.js -f cjs -o build/mixpanel.cjs.js -c rollup.config.js
npx rollup -i src/loaders/loader-module-core.js -f cjs -o build/mixpanel-core.cjs.js -c rollup.config.js
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
npx rollup -i src/loaders/loader-module.js -f umd -o build/mixpanel.umd.js -n mixpanel -c rollup.config.js

echo 'Bundling module-loader test runners'
Expand Down
Loading

0 comments on commit 319b2b1

Please sign in to comment.