Skip to content

Commit

Permalink
slightly modernize readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tdumitrescu committed Aug 2, 2024
1 parent c543b69 commit dc74002
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ intended to be used by websites wishing to send data to Mixpanel projects. A ful
is available [here](https://developer.mixpanel.com/docs/javascript-full-api-reference).

## Alternative installation via NPM
This library is available as a [package on NPM](https://www.npmjs.com/package/mixpanel-browser) (named `mixpanel-browser` to distinguish it from Mixpanel's server-side Node.js library, available on NPM as `mixpanel`). To install into a project using NPM with a front-end packager such as [Browserify](http://browserify.org/) or [Webpack](https://webpack.github.io/):
This library is available as a [package on NPM](https://www.npmjs.com/package/mixpanel-browser) (named `mixpanel-browser` to distinguish it from Mixpanel's server-side Node.js library, available on NPM as `mixpanel`). To install into a project using NPM with a front-end packager such as [Vite](https://vitejs.dev/) or [Webpack](https://webpack.github.io/):

```sh
npm install --save mixpanel-browser
```

You can then require the lib like a standard Node.js module:
You can then import the lib:

```javascript
var mixpanel = require('mixpanel-browser');
import mixpanel from 'mixpanel-browser';

mixpanel.init("YOUR_TOKEN");
mixpanel.track("An event");
Expand Down

0 comments on commit dc74002

Please sign in to comment.