setVisitorIDLifetime

The setVisitorIDLifetime() method sets the lifetime duration for the visitor ID. After this time, a new visitor ID is generated. The default value is 0 (the visitor ID never expires).

Syntax

await FlutterPiwikPro.sharedInstance.setVisitorIDLifetime(visitorIDLifetimeInMilliseconds);

Parameters

visitorIDLifetimeInMilliseconds (number, required)

The lifetime duration (in milliseconds) for the visitor ID. Default value: 0 (the visitor ID never expires).

Examples

To set the visitor ID lifetime to 30 days (30x24x60x60x1000 milliseconds):

await FlutterPiwikPro.sharedInstance.setVisitorIDLifetime(30 * 24 * 60 * 60 * 1000);

Related methods