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

Allow a context generator to return an array object for use in addGlobalContexts() #1137

Open
rlh1994 opened this issue Jan 4, 2023 · 0 comments
Labels
type:enhancement New features or improvements to existing features.

Comments

@rlh1994
Copy link

rlh1994 commented Jan 4, 2023

Is your feature request related to a problem? Please describe.
I may have multiple global contexts that depend on some globalstate/the event type/schema etc. Currently to have multiple global contexts be dynamically generated I have to create a generating function for each context and then combine them in an array in the addGlobalContexts() call, as a single generating function that returns a list does not work (no contexts are tracked).

Describe the solution you'd like
addGlobalContexts() to take as an input acontextGenerator type function that returns an array object

Describe alternatives you've considered
Creating multiple contextGenerator type functions and passing an array of them to addGlobalContexts() e.g. addGlobalContexts([contextGenerator1, contextGenerator2, ...])

Additional context
Relevant docs https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/javascript-trackers/browser-tracker/browser-tracker-v3-reference/tracking-events/#context-generators

@rlh1994 rlh1994 added the type:enhancement New features or improvements to existing features. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New features or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

1 participant