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

Expose return value of dispatch call via trackEvent #91

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

Conversation

jmif
Copy link

@jmif jmif commented Sep 7, 2018

This allows us to receive the result of the dispatch function in trackEvent calls.

Main use case for this is waiting to execute code until the event has been successfully tracked. Our tracking method inside of dispatch() returns a promise that resolves when the event has been successfully tracked.

We can use this to delay execution of events (for example exiting link clicks on critical events) until the event has tracked.

@tizmagik
Copy link
Collaborator

tizmagik commented Sep 8, 2018

Nice. The use case makes sense 👍

Mind adding some docs and a test case please?

@jbadeau
Copy link

jbadeau commented Sep 24, 2018

Yes, some documentation would be great

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.

3 participants