setOfflineCacheAge
The setOfflineCacheAge() method sets the time limit for storing events in local storage. The default value is 24 hours (24x60x60x1000 milliseconds).
Syntax
tracker.setOfflineCacheAge(milliseconds);
tracker.offlineCacheAge = milliseconds
Parameters
milliseconds (number, required)
The time (in milliseconds) after which events are removed from local storage. Default value: 24 hours (24x60x60x1000 milliseconds). If 0 is set, events are stored forever (unlimited time). If -1 is set, event storing is turned off.
Examples
To set the time limit to 12 hours (12x60x60x1000 milliseconds):
tracker.setOfflineCacheAge(12 * 60 * 60 * 1000);
tracker.offlineCacheAge = 12 * 60 * 60 * 1000
Related methods
Updated 6 days ago