We know it's possible to track user interaction from clicking on the Widget or deep linking, but is it possible to track the user interacting with your app's widget from the Widget library and adding it to their Home Screen? For example, this will help us understand how many people have added our containing app's widget to their Home Screen
There is no callback or anything similar that is executed when a user adds a widget. You could track widget timeline refresh but that will trigger a lot of analytics events.
A better solution would be to use WidgetKit.getCurrentConfigurations(_:) at launch, track which widgets have been added/removed by comparing to a list stored in UserDefaults, and send the corresponding analytics events.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With