mixpanel-node icon indicating copy to clipboard operation
mixpanel-node copied to clipboard

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

Open austinpray-mixpanel opened this issue 1 year ago • 0 comments

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

austinpray-mixpanel avatar May 14 '24 16:05 austinpray-mixpanel