setVisitorIDLifetime

The setVisitorIDLifetime() method sets how long the visitor ID is valid. After this time, a new visitor ID is generated. The default value is 0, which means the visitor ID never expires.

Syntax

await FlutterPiwikPro.sharedInstance.setVisitorIDLifetime(visitorIDLifetimeInMilliseconds);

Parameters

visitorIDLifetimeInMilliseconds (number, required)

The visitor ID lifetime in milliseconds. The default value is 0, which means 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