setDryRun

The setDryRun() method sets a dry-run flag and lets you test and debug tracking. The dry-run flag prevents data from being sent to Piwik PRO and instead prints it to the console.

Syntax

await PiwikProSdk.setDryRun(shouldDryRun);

Parameters

shouldDryRun (boolean, required)

Whether the dry-run flag is set.

  • true if the flag is set
  • false if the flag isn’t set

Examples

To set the dry-run flag:

await PiwikProSdk.setDryRun(true);