setSessionTimeout

The setSessionTimeout() method sets the the session timeout. The default value is 30 minutes.

Syntax

getTracker().setSessionTimeout(milliseconds);
tracker.setSessionTimeout(milliseconds)

Parameters

milliseconds (number, required)

The time (in milliseconds) after which the session expires.

Examples

To set the expiration time to 60 minutes (60x60x1000 milliseconds):

getTracker().setSessionTimeout(30 * 60 * 1000));
tracker.setSessionTimeout(30 * 60 * 1000))