setDispatchInterval
The setDispatchInterval() method sets a custom dispatch interval. Tracked events are temporarily stored in a queue and dispatched in batches. The default dispatch interval time is 30 seconds (30,000 milliseconds). Batches are sent every 30 seconds.
Syntax
await FlutterPiwikPro.sharedInstance.setDispatchInterval(milliseconds);Parameters
milliseconds (number, required)
The dispatch interval in milliseconds for tracked events. If set to 0 milliseconds, events are sent immediately. If set to -1 milliseconds, events won’t be sent automatically and must be sent manually with dispatch().
Examples
To set the dispatch interval to 60 seconds (60x1000 milliseconds):
await FlutterPiwikPro.sharedInstance.setDispatchInterval(60*1000);Notes
- If more than one event is queued, the data is sent in bulk using the POST method with a JSON payload.
Updated 21 days ago