Hello!
In my Flutter app I have a situation where I need to track a screen right before disabling tracking. I use the following code to take care of that:
await FlutterPiwikPro.sharedInstance.trackScreen(screenName: 'My screen');
await FlutterPiwikPro.sharedInstance.dispatch();
await FlutterPiwikPro.sharedInstance.optOut(true);
This works for the most part, but on Android, sometimes (~20-40% of the time) the page view event is not actually sent. From what I understand, it seems that dispatch()
is not fast enough so to speak, and the page view event is cleared from the dispatch queue by the optOput
before being sent.
Am I understanding situation correctly? Can you suggest any workaround? Is there a chance of this being fixed?