setSessionHash

The setSessionHash() method controls the sh parameter sent with tracking events. The SDK persists this setting and keeps the state between app launches. The default value is SessionHash.disabled.

Syntax

await FlutterPiwikPro.sharedInstance.setSessionHash(sessionHash);

Parameters

sessionHash (SessionHash, required)

The session hash mode. Available values:

  • SessionHash.enabled — the sh parameter is set to 1.
  • SessionHash.disabled — the sh parameter is set to 0 (default).
  • SessionHash.notSet — the sh parameter is not sent. The processing service will use the value from the Privacy tab in the global or app settings.

Examples

To enable the session hash:

await FlutterPiwikPro.sharedInstance.setSessionHash(SessionHash.enabled);

Related methods