analytics
analytics copied to clipboard
feat: custom ID resolvers
Trying to implement a @TODO I saw in @analytics/core
:
@TODO add custom value reolvers for userId and anonId
A small issue I encountered is that most public functions except the analytics.user()
function is async
. We can easily make the custom resolvers async
(allowing network requests, etc.) but it would be a breaking change. I think this is a small enough addition that is very helpful in the short term, even without allowing async
resolvers and the team/project can discuss changing the signature in a future major version.
@DavidWells Do you have an opinion?