maxAgeOfQueuedEvents

The maxAgeOfQueuedEvents property sets how long queued events are kept in local storage. Events older than this value are removed before the next dispatch. The default value is 0, which means queued events are kept indefinitely.

Syntax

PiwikTracker.sharedInstance()?.maxAgeOfQueuedEvents = seconds
[PiwikTracker sharedInstance].maxAgeOfQueuedEvents = seconds;

Parameters

  • maxAgeOfQueuedEvents (number, required)

The time, in seconds, after which queued events are removed from local storage. Default value: 0, which means events are kept indefinitely. Set a positive value to expire queued events automatically.

Examples

To set the time limit to 12 hours (12x60x60 seconds):

PiwikTracker.sharedInstance()?.maxAgeOfQueuedEvents = 12 * 60 * 60
[PiwikTracker sharedInstance].maxAgeOfQueuedEvents = 12 * 60 * 60;

Related methods


Did this page help you?