sendEvent method
Sends an Event hit to Google Analytics. label
specifies the event label.
value
specifies the event value. Values must be non-negative.
parameters
can be any analytics key/value pair. Useful
for custom dimensions, etc.
Implementation
@override
Future<void> sendEvent(String category, String action,
{String? label, int? value, Map<String, String>? parameters}) {
final args = <String, String>{
'ec': category,
'ea': action,
if (label != null) 'el': label,
if (value != null) 'ev': value.toString(),
...?parameters
};
return _enqueuePayload('event', args);
}