isPrefixingEnabled
The isPrefixingEnabled property controls whether sendView() and sendViews() prepend the screen segment to the tracked path.
By default, this property is true. For example, settings is reported as screen/settings. This makes screen paths easier to identify in reports.
When set to false, the SDK uses only the segments you pass. For example, settings is reported as settings, and more/settings/account is reported as more/settings/account.
Syntax
PiwikTracker.sharedInstance()?.isPrefixingEnabled = isPrefixingEnabled[PiwikTracker sharedInstance].isPrefixingEnabled = isPrefixingEnabled;Parameters
- isPrefixingEnabled (boolean, required)
When true, sendView() and sendViews() prepend the screen segment to tracked paths. When false, they do not. Default value: true.
Examples
To turn off automatic prefixing and use your own naming scheme:
PiwikTracker.sharedInstance()?.isPrefixingEnabled = false[PiwikTracker sharedInstance].isPrefixingEnabled = NO;Notes
If you turn prefixing off, screen views are no longer grouped under screen/ in reports unless you add your own prefix to the view names.
Related methods
Updated 2 months ago