setPrefixing

The setPrefixing() method turns on or off automatic prefixing. If turned on, URLs will get prefixes automatically when certain methods are used. Example: The track().screen() method will add the screen prefix to the URL.

By default, setPrefixing(true) is set. This means that prefixes are added automatically.

Syntax

getTracker().setPrefixing(isAutomatic);
tracker.isPrefixing = isAutomatic

Parameters

isAutomatic (boolean, required)

Whether URLs get prefixes automatically. True: prefixes are added automatically. False: prefixes are not added automatically.

Examples

To turn off automatic prefixing:

getTracker().setPrefixing(false);
tracker.isPrefixing = false