Skip to content

Re-send analytics user properties when usage sharing is turned on - #34

Merged
ps2 merged 1 commit into
next-devfrom
fix/resend-identify-on-sharing
Oct 13, 2026
Merged

ps2 merged 1 commit into
next-devfrom
fix/resend-identify-on-sharing

Conversation

@ps2

@ps2 ps2 commented Oct 13, 2026

Copy link
Copy Markdown

Loop sends user properties (App Name, Workspace Revision, Dosing Strategy, Services, and with LoopKit/Loop changes coming also Pump Type, CGM Type and algorithm experiment state) once, at launch. If Usage Data Sharing was not Share Usage Data at that point, LoopKitAnalytics dropped them. Turning sharing on later created the client but didn't re-send anything, so the properties stayed empty until the next relaunch. This was seen on a test device: no $identify after sharing was turned on, then one arrived after a force-quit.

LoopKitAnalytics now keeps the latest value of each identified property, whatever the sharing setting, and sends all of them in one identify when the preference changes to Share Usage Data. Nothing is sent while sharing is below that level.

Tested by building the LoopWorkspace scheme for device. Not yet exercised on a phone.

User properties such as App Name, Workspace Revision and Pump Type are
identified once at launch. If usage data sharing was off then, they were
dropped, and nothing sent them once sharing was turned on, so they
stayed empty until Loop was relaunched. Keep the latest value of each
property and send them all when the preference changes to Share Usage
Data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant