Tracker: option to *not* await the request to /api/send
#2734
YellowKirby
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hola! I was recently working on a local webapp with slow wifi and realized that there are cases where the Umami tracker code
await
s the network call to/api/send
, like when trying to use thedata-
attributes to add more details to a link:When the user clicks this link, the umami tracker first waits for
trackElement()
to return before actually performing the navigation. This can cause a noticeable lag for the user if for any reason the stats call is slow to return.Would folks be open to a configuration option so the tracker never waits for network requests? I realize that this may lead to some dropped/missed data, but for my use-case keeping the user experience and performance as fast as possible is more important than needing to ensure all the data gets properly collected.
This also might be somewhat related to the batching conversation: #1473
As an alternative, I can manually send data to the API directly and have full control over when and how the calls are made, so I totally understand if y'all don't want to introduce this sort of uncertainty into the main tracker. But I thought I'd bring it up for discussion :)
Thank you! 🙏
Beta Was this translation helpful? Give feedback.
All reactions