setSessionHash
The setSessionHash() method controls the sh parameter sent with tracking events. The SDK saves this setting between app launches. The default value is DISABLED.
Syntax
import { SessionHash } from '@piwikpro/react-native-piwik-pro-sdk';
await PiwikProSdk.setSessionHash(sessionHash);Parameters
sessionHash (SessionHash, required)
The session hash mode. Available values:
- SessionHash.ENABLED — The
shparameter is set to1. - SessionHash.DISABLED — The
shparameter is set to0(default). - SessionHash.NOT_SET — The
shparameter isn't sent. The processing service uses the value from the Privacy tab in global or app settings.
Examples
To enable the session hash:
import { SessionHash } from '@piwikpro/react-native-piwik-pro-sdk';
await PiwikProSdk.setSessionHash(SessionHash.ENABLED);Related methods
Updated about 5 hours ago