getSessionHash

The getSessionHash() method returns the current session hash mode.

Syntax

const currentSessionHash = await PiwikProSdk.getSessionHash();

Returns

The current session hash mode. Available values:

  • SessionHash.ENABLED (1) — The sh parameter is set to 1.
  • SessionHash.DISABLED (0) — The sh parameter is set to 0 (default).
  • SessionHash.NOT_SET (2) — The sh parameter isn't sent.

Type: SessionHash

Examples

To read the current session hash mode:

const currentSessionHash = await PiwikProSdk.getSessionHash();

Related methods