You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to track link clicks: Swetrix.track({ ev: 'cta_link_click' });
The issue with this is the navigation happens before the event finishes sending and thus the request fails with NS_BINDING_ABORTED status without being sent. The solution would be returning a promise from the Swetrix.track function or accepting a callback to know when the event has finished sending and proceed with the navigation then.
I can implement this functionality I just wanted to make sure this contribution would be welcome.
The text was updated successfully, but these errors were encountered:
I'm also noticing you are using XMLHttpRequest to send requests instead of the fetch API. Is there any particular reason? If there is no need to keep this I would replace it with fetch since XHR would require me to wrestle with callbacks instead of simply returning a promise.
I'm trying to track link clicks:
Swetrix.track({ ev: 'cta_link_click' });
The issue with this is the navigation happens before the event finishes sending and thus the request fails with NS_BINDING_ABORTED status without being sent. The solution would be returning a promise from the Swetrix.track function or accepting a callback to know when the event has finished sending and proceed with the navigation then.
I can implement this functionality I just wanted to make sure this contribution would be welcome.
The text was updated successfully, but these errors were encountered: