Skip to content

2.2.0

Choose a tag to compare

@SvenAlHamad SvenAlHamad released this 07 Mar 09:30
· 10 commits to v2 since this release
51fd5a8

First, it ensures the promise created in the _apiCall is returned to the caller, which also enables the trackEvent method to do the same. This way, the caller of the trackEvent method can decide whether they want to wait for the promise to resolve or not. This can be useful if the user wants to e.g. terminate the process only after the event has been sent, not before.

With that, we also ensure that, in the Admin version of the WTS class, the provided fetch and btoa callbacks are bound to the window object. Without this step, the bindings change internally (because the callbacks are called via this.), which causes trackEvent calls to fail.