setDispatchInterval
The setDispatchInterval() method sets a custom dispatch interval time. Tracked events are temporarily stored in a queue and dispatched in batches. The default dispatch interval time is 30 seconds (3000 milliseconds) – batches are sent every 30 seconds.
Syntax
await FlutterPiwikPro.sharedInstance.setDispatchInterval(milliseconds)
Parameters
milliseconds (number, required)
The interval time (in milliseconds) for dispatching tracked events. If 0 milliseconds, events will be sent right away. If -1 milliseconds, events won’t be sent automatically and can be send manually.
Examples
To set the dispatch interval time 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 6 days ago