analytics icon indicating copy to clipboard operation
analytics copied to clipboard

feat: custom ID resolvers

Open UnbrandedTech opened this issue 2 years ago • 1 comments

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.

UnbrandedTech avatar Oct 27 '21 16:10 UnbrandedTech

@DavidWells Do you have an opinion?

UnbrandedTech avatar Dec 16 '21 16:12 UnbrandedTech