Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jun 4, 2023

Bumps mixpanel from 0.10.1 to 0.17.0.

Release notes

Sourced from mixpanel's releases.

Default to millisecond-precision timestamps

As of this release, time properties set as Date objects will be sent to the Mixpanel API with millisecond precision (instead of being rounded to the second).

Support for geolocation and library version property

The configuration option geolocate can be used to take advantage of Mixpanel's automatic geolocation properties (converting the source IP address into properties for country/region/city). This is generally useful when the NodeJS SDK is used in a client application, such as an Electron app or IoT device; whereas in a server application (e.g. an Express application server), the IP address will be that of the server rather than the user. To turn on geolocation, initialize the library with geolocate: true:

const mixpanel = Mixpanel.init('<YOUR_TOKEN>', {
  geolocate: true,
});

The SDK also now sends the current library version as a property with every event, like Mixpanel's other SDKs.

Use keepAlive by default for request connections

The library now defaults to using keepAlive (https://nodejs.org/api/http.html#new-agentoptions) so that each request doesn't have to establish a new connection. This should result in better performance and network reliability. If you need to turn this option off, initialize the library with keepAlive: false:

const mixpanel = Mixpanel.init('<YOUR_TOKEN>', {
  keepAlive: false,
});

Support for latitude/longitude in profile operations

Profile update operations set and set_once now support passing latitude/longitude for geolocation (see https://help.mixpanel.com/hc/en-us/articles/115004499343#latitude-and-longitude-based-geolocation). These should be passed in the 'modifiers' object param, e.g.:

mixpanel.people.set('billybob', {
  plan: 'premium',
  games_played: 1,
}, {
  $latitude: 40.7127753,
  $longitude: -74.0059728,
});

Event operations like track() already supported latitude/longitude as regular event properties.

API Secret support for imports

The supported method for authenticating import() calls (for events more than 5 days old) is now via the project's API Secret, passed via the secret config option:

const mixpanel = Mixpanel.init(`<TRACKING TOKEN>`, {secret: `<API SECRET>`});

This will be passed as a HTTP Basic auth header as described in https://developer.mixpanel.com/reference/importing-old-events. It will only be sent over HTTPS (the default protocol); the library will throw an error rather than send the secret over HTTP in plaintext.

The older API "Key" authentication for import will still work, but is now deprecated and may be removed in a future version.

Support for Groups API

This release adds support for Mixpanel Groups, through the mixpanel.groups object, analogous to mixpanel.people. For projects which have groups support enabled, you can send group profile updates via calls such as:

mixpanel.groups.set('company', 'Acme Inc.', {
    'Industry': 'widgets',
</tr></table> 

... (truncated)

Changelog

Sourced from mixpanel's changelog.

0.17.0 / 2022-08-11

  • support sending timestamps with millisecond precision

0.16.0 / 2022-06-02

  • support automatic geolocation with geolocate option (thanks tmpvar)
  • send library version as property with events (thanks ArsalImam)

0.15.0 / 2022-05-20

  • use keepAlive by default for requests

0.14.0 / 2021-10-29

  • support $latitude and $longitude in profile operations (thanks wneild)

0.13.0 / 2020-09-04

  • support API Secret auth for imports and deprecate use of API Key

0.12.0 / 2020-08-31

  • https-proxy-agent upgrade to 5.0.0 to fix https.request patching and many subdependency upgrades (thanks veerabio)
  • dropped support for node 8

0.11.0 / 2019-11-26

  • add support for Groups API

0.10.3 / 2019-10-09

  • upgrade https-proxy-agent for security fix (thanks omrilotan)

0.10.2 / 2019-03-26

  • type definitions for people.unset (thanks bradleyayers)
Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [mixpanel](https://github.com/mixpanel/mixpanel-node) from 0.10.1 to 0.17.0.
- [Release notes](https://github.com/mixpanel/mixpanel-node/releases)
- [Changelog](https://github.com/mixpanel/mixpanel-node/blob/master/history.md)
- [Commits](mixpanel/mixpanel-node@v0.10.1...v0.17.0)

---
updated-dependencies:
- dependency-name: mixpanel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant