setIncludeDefaultCustomVars

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

Syntax

tracker.includeDefaultCustomVars = isFetched
getTracker().setIncludeDefaultCustomVars(isFetched);

Parameters

isFetched (boolean, required)

Whether platform, OS and app version are fetched from the tracker instance.

  • true if the values are fetched
  • false if the values aren’t fetched

Examples

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

tracker.includeDefaultCustomVars = false
getTracker().setIncludeDefaultCustomVars(false);

Notes

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

Related methods