setIncludeDefaultVariables

The setIncludeDefaultVariables() method turns on or off fetching platform, OS and app version from the tracker instance. It is turned on by default.

Syntax

await PiwikProSdk.setIncludeDefaultCustomVariables(shouldInclude);

Parameters

shouldInclude (boolean, required)

Whether platform, OS and app version are fetched from the tracker instance. True: is fetched. False: is not fetched.

Examples

To turn off automatic fetching of platform, OS and app version from the tracker instance:

await PiwikProSdk.setIncludeDefaultCustomVariables(false);

Notes

  • If setIncludeDefaultVariables(true) is set, indexes 1-3 are used to track the platform, OS and app version as custom variables.