algolia / search-insights.js

Library for reporting click, conversion and view metrics using the Algolia Insights API
MIT License
53 stars 18 forks source link

feat: add support for authenticatedUserToken #513

Closed jkaho closed 1 year ago

jkaho commented 1 year ago

What

Links

EEX-746

More context:

codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 21a2262da17179b87e632e1e1d0c5952aaa59a3f:

Sandbox Source
Vanilla Configuration
francoischalifour commented 1 year ago

In a similar manner to Segment's identify method I feel like we need a way to easily reset the identifiers. I know we're not at the point of adding an "identify" type event at the moment, but I just wanted to raise it.

Definitely! I wrote a proposal about accepting aa('setUserToken', undefined) (or aa('setAuthenticatedUserToken', undefined)) to restore the user token in RFC: Ability to restore anonymous user token in Search Insights.

Although it doesn't have to be implemented at the same time as this introduction, it's needed to support logout scenarios.

jkaho commented 1 year ago

@JasonBerry made some additional changes as per my commits 🙏