trackCustomDimension

The trackCustomDimension() method sets a custom dimension value. You can sen the value to Piwik PRO with a screen view or other event.

Syntax

await FlutterPiwikPro.sharedInstance.trackCustomDimension(index: customDimensionId, value: 'customDimensionValue');

Parameters

index (number, required)

The custom dimension ID.

value (string, required)

The custom dimension value.

Examples

To set a custom dimension with the ID 1 and the value 5 stars, then send it with a screen view:

await FlutterPiwikPro.sharedInstance.trackCustomDimension(index: 1, value: '5 stars');

To set a custom dimension with the ID 2 and the value paid subscriber , then send it with an event:

await FlutterPiwikPro.sharedInstance.trackCustomDimension(index: 2, value: 'paid subscriber');

Notes

  • After a dimension is sent with an event, it's deleted and won't be sent with the next event. See it each time you wan to send it.