Hit Batching

Hit batching allows applications with offline tracking enabled to hold hits from being sent until the number of hits in the queue pass a configurable limit.

Requires SDK version 4.1 or later

To enable hit batching, you need to update your ADBMobileConfig.json and specify a value for batchLimit:

"analytics": {
    "batchLimit": 5,

When set to a number higher than 0, the SDK queues the number of hits equal to batchLimit. After this threshold is passed, all hits in the queue are sent.

The following methods are used in conjunction with hit batching:

  • trackingGetQueueSize() - Returns an NSUInteger with the number of hits currently in the hit batching queue.
  • trackingSendQueuedHits() - Forces the library to send all hits in the queue no matter how many are currently queued.
  • trackingClearQueue() - Clears all hits from the queue without sending them.

Warning: Offline tracking must be enabled to use hit batching.

Parent topic: Configuration