setDryRunTarget

The setDryRunTarget() method sets a dry-run flag and lets you test and debug tracking. The dry-run flag prevents data from being sent to Piwik PRO and instead prints it to the console.

Syntax

tracker.dryRunTarget = Collections.synchronizedList(dryRunTarget)
getTracker().setDryRunTarget(dryRunTarget);

Parameters

dryRunTarget (Collection, required)

The data structure to which the data shoud be sent. Type: List<Packet>. Set it to null to disable the dry-run flag.

Examples

To set the dry-run flag:

tracker.dryRunTarget = Collections.synchronizedList(ArrayList())
getTracker().setDryRunTarget(Collections.synchronizedList(new ArrayList<Packet>()));