isPrefixingEnabled

The isPrefixingEnabled property controls whether sendView() and sendViews() add a leading screen segment to the tracked path. With the default true, a single segment like settings is reported as screen/settings, which keeps screen paths easy to recognize in reports. With false, only the segments you pass are used (for example settings or more/settings/account for hierarchical views).

Syntax

PiwikTracker.sharedInstance()?.isPrefixingEnabled = isPrefixingEnabled
[PiwikTracker sharedInstance].isPrefixingEnabled = isPrefixingEnabled;

Parameters

  • isPrefixingEnabled boolean, required. If true, sendView / sendViews prepend the screen segment. If false, they do not. Default value: true.

Examples

To turn off automatic prefixing (for example, to apply your own naming scheme in the strings you pass to sendView):

PiwikTracker.sharedInstance()?.isPrefixingEnabled = false
[PiwikTracker sharedInstance].isPrefixingEnabled = NO;

Notes

If you turn prefixing off, screen views are no longer grouped under screen/ unless you add an equivalent prefix yourself in the view names.

Related methods