Sending events on Flutter

You can send multi-level events in AppMetrica. For more information about displaying multi-level events, see Events.

To send a multi-level event, pass a key:value pair in the event parameters. In the interface, key and value are considered nesting levels. Event parameters can be sent as a JSON or Map object.

To send event parameters in JSON format, use the reportEventWithJson method, with JSON passed as a string.

AppMetrica.reportEventWithJson('App Open', '{"key1": "value1", "key2": "value2"}');

To send event parameters as a Map object, use the reportEventWithMap method:

  Map<String, Object> attributesMap = {
      "key1": "value1",
      "key2": 18,
      "key3": true
  };
  AppMetrica.reportEventWithMap('App Open', attributesMap);

See also

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support