logRevenue method

Future<void> logRevenue(
  1. String productIdentifier,
  2. int quantity,
  3. double price
)

Tracks revenue. This allows us to automatically display data relevant to revenue on the Amplitude website, including average revenue per daily active user (ARPDAU), 7, 30, and 90 day revenue, lifetime value (LTV) estimates, and revenue by advertising campaign cohort and daily/weekly/monthly cohorts.

Implementation

Future<void> logRevenue(
    String productIdentifier, int quantity, double price) async {
  Map<String, dynamic> properties = _baseProperties();
  properties['productIdentifier'] = productIdentifier;
  properties['quantity'] = quantity;
  properties['price'] = price;

  return await _channel.invokeMethod('logRevenue', jsonEncode(properties));
}