maxAgeOfQueuedEvents

The maxAgeOfQueuedEvents() method sets the time limit for storing events in local storage. The default value is 24 hours (24x60x60 seconds).

Syntax

[PiwikTracker sharedInstance].maxAgeOfQueuedEvents = milliseconds;

Parameters

milliseconds (number, required)

The time (in seconds) after which events are removed from local storage. Default value: 24 hours (24x60x60 seconds). If set to 0, events are stored forever (unlimited time). If set to -1, storing is turned off.

Examples

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

[PiwikTracker sharedInstance].maxAgeOfQueuedEvents = 12 * 60 * 60;

Related methods