Event buffering
By default, the Adtrace SDK sends event information as soon as a user triggers an event. If your app tracks many events, you can enable event buffering to store events locally and send them in one batch once per minute.
Set this option on your ADTConfig instance before you call [Adtrace appDidLaunch:] / Adtrace.appDidLaunch(...). See Configuration for how to create the config.
Method signature
- (void)setEventBufferingEnabled:(BOOL)eventBufferingEnabled;
You can also assign the eventBufferingEnabled property directly on ADTConfig.
| Parameter | Type | Description |
|---|---|---|
eventBufferingEnabled | BOOL | Set YES / true to enable event buffering. Set NO / false to send events immediately (default). |
Enable event buffering
Call setEventBufferingEnabled: on your ADTConfig instance.
Example
- Objective-C
- Swift
- Javascript
[adtraceConfig setEventBufferingEnabled:YES];
Or assign the property:
adtraceConfig.eventBufferingEnabled = YES;
adtraceConfig?.eventBufferingEnabled = true
adtraceConfig.setEventBufferingEnabled(true);
If nothing is set, event buffering is disabled by default.