appcues / appcues-android-sdk

The Appcues Android SDK
https://www.appcues.com/mobile
MIT License
10 stars 3 forks source link

Batch group updates with user identification when called right after identify #535

Closed iujames closed 1 year ago

iujames commented 1 year ago

This is a similar update to what was recently done in the web sdk in https://github.com/appcues/javascript-sdk/pull/613

This is an example of what this result would look like, for a new user landing on a login page, signing in, and then triggering the resulting user profile update, the session_started event, and an immediate group update to identify that user's current group and props. Screenshot 2023-11-08 at 3 27 28 PM

This is implemented by adding a new priority queue to our AnalyticsQueueProcessor - the 50ms queue. We still have the 10 sec background batching queue for flow events as well. If a new priority update comes in (identify or session_start) it will flush anything in the queue existing, and start this new 50ms queue to gather up all immediately subsequent updates.

Couple of edge cases:

shortcut-integration[bot] commented 1 year ago

This pull request has been linked to Shortcut Story #59021: batch identify() and immediate group() calls together.