startNewSession

The startNewSession() method manually starts a new session when sending an event to Piwik PRO. By default, a session closes after 30 minutes of inactivity, counting from the last recorded event.

Syntax

await PiwikProSdk.startNewSession();

Examples

To start a new session:

await PiwikProSdk.startNewSession();

Related methods