Skip to content

Support for bigint #236

@antho1404

Description

@antho1404

When sending data with mixpanel.track(event, data), if data contains unserializable data such as bigint, the call fails.

It would be great to support bigint in mixpanel and automatically serialize them as string.

The current workaround is to call the following to manually convert these bigint into string so there are no errors in the mixpanel library.

mixpanel.track(event, JSON.parse(
  JSON.stringify(data, (key, value) => {
    if (typeof value === "bigint") return value.toString();
    return value;
  })
))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions