Sending events on Android

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 YandexMetrica.reportEvent(String eventName, String jsonValue) method. JSON should be passed as a string:

String eventParameters = "{\"name\":\"Alice\", \"age\":\"18\"}";

YandexMetrica.reportEvent("New person", eventParameters);
Copied to clipboard

The report in the web interface shows the following:

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.