public class AppMetricaJsInterface
extends java.lang.Object
| Constructor and Description |
|---|
AppMetricaJsInterface(com.yandex.metrica.impl.proxy.YandexMetricaProxy proxy) |
| Modifier and Type | Method and Description |
|---|---|
void |
reportEvent(java.lang.String name,
java.lang.String value)
Reports event with name and json value to AppMetrica from JS code.
|
public AppMetricaJsInterface(@NonNull
com.yandex.metrica.impl.proxy.YandexMetricaProxy proxy)
public void reportEvent(java.lang.String name,
java.lang.String value)
function reportToAppMetrica() {
// you can skip this check if you guarantee that it is always present
if (typeof(AppMetrica) !== 'undefined') {
AppMetrica.reportEvent("My name", "{}");
}
}
name - event namevalue - event value in json format