setServerAnonymisation method

Future<void> setServerAnonymisation(
  1. bool serverAnonymisation
)

Sets whether server-side anonymisation is enabled (the SP-Anonymous header).

This toggles the serverAnonymisation flag at runtime, without having to recreate the tracker. Not supported on Web.

Implementation

Future<void> setServerAnonymisation(bool serverAnonymisation) async {
  await Snowplow.setServerAnonymisation(serverAnonymisation,
      tracker: namespace);
}