Skip to content

Support for strict=1 parameter in import api to support validation #233

@austinpray-mixpanel

Description

@austinpray-mixpanel

We recommend setting strict=1 in our docs but there's not way to enable that using the SDK. We should add a configuration option to allow import to be strict.

https://developer.mixpanel.com/reference/import-events#validation

Validation
If you provide the strict=1 parameter (recommended), /import will validate the supplied events and returns a 400 status code if any of the events fail validation with details of the error. If some events pass validation and others fail, Mixpanel will ingest the events that pass validation. When you encounter a 400 error in production, simply log the JSON response, as it will contain the $insert_ids of the invalid events, which can be used to debug.

  • We could add a strict option to the import, import_batch methods
  • We could also add a strict option to the client to make all requests strict

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions