logViewItem method
Logs the standard view_item
event.
This event signifies that some content was shown to the user. This
content may be a product, a webpage or just a simple image or text. Use
the appropriate parameters to contextualize the event. Use this event to
discover the most popular items viewed in your app. Note: If you supply
the value
parameter, you must also supply the currency
parameter so
that revenue metrics can be computed accurately.
Implementation
Future<void> logViewItem({
String? currency,
double? value,
List<AnalyticsEventItem>? items,
Map<String, Object?>? parameters,
}) {
_requireValueAndCurrencyTogether(value, currency);
_assertParameterTypesAreCorrect(parameters);
_assertItemsParameterTypesAreCorrect(items);
return _delegate.logEvent(
name: 'view_item',
parameters: filterOutNulls(<String, Object?>{
_CURRENCY: currency,
_VALUE: value,
_ITEMS: _marshalItems(items),
if (parameters != null) ...parameters,
}),
);
}