dispatchInterval
The dispatchInterval() 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 – batches are sent every 30 seconds.
Syntax
[PiwikTracker sharedInstance].dispatchInterval = seconds;
Parameters
seconds (number, required)
The interval time (in seconds) for dispatching tracked events. If 0 seconds, events will be sent right away. If -1 seconds, events won't be sent automatically and can be sent manually.
Examples
To set the dispatch interval time to 60 seconds:
[PiwikTracker sharedInstance].dispatchInterval = 60;
To block sending events automatically and send it manually:
[PiwikTracker sharedInstance].dispatchInterval = -1;
[[PiwikTracker sharedInstance] sendExceptionWithDescription:@"Content download error"];
[[PiwikTracker sharedInstance] dispatch];
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