laravel-segment icon indicating copy to clipboard operation
laravel-segment copied to clipboard

Support context on a per-event basis

Open greyvugrin opened this issue 1 year ago • 1 comments

The batch endpoint allows individual context, per https://segment.com/docs/connections/sources/catalog/libraries/server/http-api/#batch

context Object, optional The same as Context for other calls, but it will be merged with any context inside each of the items in the batch.

This updates the track and identify methods to take in an optional context array, which carries through to the final API call.

It's useful to be able to pass in page context or anything that may change per event.

greyvugrin avatar Mar 24 '23 18:03 greyvugrin