Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support context on a per-event basis #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

greyvugrin
Copy link

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.

@slashequip
Copy link
Owner

Thanks for this @greyvugrin - and sorry it's taken me a long time to get to it. I'll review this MR and see if we can get it in to the package :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants