logAdImpression method
Future<void>
logAdImpression({
- String? adPlatform,
- String? adSource,
- String? adFormat,
- String? adUnitName,
- double? value,
- String? currency,
- Map<
String, Object> ? parameters, - AnalyticsCallOptions? callOptions,
inherited
Logs the standard ad_impression
event.
This event signifies when a user sees an ad impression. 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> logAdImpression({
String? adPlatform,
String? adSource,
String? adFormat,
String? adUnitName,
double? value,
String? currency,
Map<String, Object>? parameters,
AnalyticsCallOptions? callOptions,
}) {
_requireValueAndCurrencyTogether(value, currency);
_assertParameterTypesAreCorrect(parameters);
return _delegate.logEvent(
name: 'ad_impression',
parameters: filterOutNulls(<String, Object?>{
_AD_PLATFORM: adPlatform,
_AD_SOURCE: adSource,
_AD_FORMAT: adFormat,
_AD_UNIT_NAME: adUnitName,
_VALUE: value,
_CURRENCY: currency,
if (parameters != null) ...parameters,
}),
callOptions: callOptions,
);
}