Methods reference

In the code, use AppMetrica.Instance for accessing AppMetrica.

Activating the plugin
void ActivateWithConfiguration(YandexAppMetricaConfig config);
event ConfigUpdateHandler OnActivation;
YandexAppMetricaConfig? ActivationConfig { get; }
Event tracking
void ReportEvent(string message);
void ReportEvent(string message, Dictionary<string, object> parameters);
void ReportError(string condition, string stackTrace);
Monitoring sessions
void ResumeSession();
void PauseSession();
AppMetrica settings
void SetLocationTracking(bool enabled);
void SetLocation(YandexAppMetricaConfig.Coordinates? coordinates);
void SetUserProfileID(string userProfileID);
Sending Revenue
void ReportRevenue(YandexAppMetricaRevenue revenue);
Sending user profiles
void ReportUserProfile(YandexAppMetricaUserProfile userProfile);
Sending the referral URL of the app install
void ReportReferralUrl (string referralUrl);
Sending a message about opening the app using a deeplink
void ReportAppOpen (string deeplink);
Disabling sending statistics
void SetStatisticsSending(bool enabled);
Force sending events from the buffer
void SendEventsBuffer();
Getting the AppMetrica ID
void RequestAppMetricaDeviceID(Action<string, YandexAppMetricaRequestDeviceIDError?> action);
Information about the version of AppMetrica used
int LibraryApiLevel { get; }
string LibraryVersion { get; }
YandexAppMetricaConfig class
YandexAppMetricaConfig(string apiKey);

string ApiKey { get; private set; }
string AppVersion { get; set; }
Coordinates? Location { get; set; }
int? SessionTimeout { get; set; }
bool? CrashReporting { get; set; }
bool? LocationTracking { get; set; }
bool? Logs { get; set; }
bool? InstalledAppCollecting { get; set; }
bool? HandleFirstActivationAsUpdate { get; set; }
YandexAppMetricaPreloadInfo? PreloadInfo { get; set; }
bool? StatisticsSending { get; set; }
bool? AppForKids { get; set; }
YandexAppMetricaConfig.Coordinates class
double Latitude { get; set; }
double Longitude { get; set; }
YandexAppMetricaPreloadInfo class
YandexAppMetricaPreloadInfo(string trackingId);
            
tring TrackingId { get; private set; }
Dictionary<string, string> AdditionalInfo { get; private set; }
YandexAppMetricaRevenue class
[Obsolete("Констурктор устарел. Используйте вместо него YandexAppMetricaRevenue(decimal priceDecimal, string currency)")]
YandexAppMetricaRevenue(double price, string currency);
YandexAppMetricaRevenue(decimal priceDecimal, string currency)

[Obsolete("Свойство устарело. Используйте вместо него PriceMicros.")]
double? Price { get; private set; }
decimal? PriceDecimal { get; private set; }
int? Quantity { get; set; }
string Currency { get; private set; }
string ProductID { get; set; }
YandexAppMetricaReceipt? Receipt { get; set; }
string Payload { get; set; }
YandexAppMetricaReceipt class
string Data { get; set; }
string Signature { get; set; }
string TransactionID { get; set; }
YandexAppMetricaUserProfile class
List<YandexAppMetricaUserProfileUpdate> GetUserProfileUpdates();
YandexAppMetricaUserProfile Apply(YandexAppMetricaUserProfileUpdate update);
YandexAppMetricaUserProfile ApplyFromArray(List<YandexAppMetricaUserProfileUpdate> updates);
YandexAppMetricaAttribute class
static YandexAppMetricaBirthDateAttribute BirthDate();
static YandexAppMetricaGenderAttribute Gender();
static YandexAppMetricaNameAttribute Name();
static YandexAppMetricaNotificationsEnabledAttribute NotificationsEnabled();
static YandexAppMetricaBooleanAttribute CustomBoolean(string key);
static YandexAppMetricaCounterAttribute CustomCounter(string key);
static YandexAppMetricaNumberAttribute CustomNumber(string key);
static YandexAppMetricaStringAttribute CustomString(string key);
YandexAppMetricaBirthDateAttribute class
YandexAppMetricaUserProfileUpdate WithAge(int age);
YandexAppMetricaUserProfileUpdate WithBirthDate(DateTime date);
YandexAppMetricaUserProfileUpdate WithBirthDate(int year);
YandexAppMetricaUserProfileUpdate WithBirthDate(int year, int month);
YandexAppMetricaUserProfileUpdate WithBirthDate(int year, int month, int day);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaBooleanAttribute class
YandexAppMetricaUserProfileUpdate WithValue(bool value);
YandexAppMetricaUserProfileUpdate WithValueIfUndefined(bool value);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaCounterAttribute class
YandexAppMetricaUserProfileUpdate WithDelta(double value);
YandexAppMetricaGenderAttribute class
YandexAppMetricaUserProfileUpdate WithValue(Gender value);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaNameAttribute class
YandexAppMetricaUserProfileUpdate WithValue(string value);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaNotificationsEnabledAttribute class
YandexAppMetricaUserProfileUpdate WithValue(bool value);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaNumberAttribute class
YandexAppMetricaUserProfileUpdate WithValue(double value);
YandexAppMetricaUserProfileUpdate WithValueIfUndefined(double value);
YandexAppMetricaUserProfileUpdate WithValueReset();
YandexAppMetricaStringAttribute class
YandexAppMetricaUserProfileUpdate WithValue(string value);
YandexAppMetricaUserProfileUpdate WithValueIfUndefined(string value);
YandexAppMetricaUserProfileUpdate WithValueReset();

For more information about API methods and AppMetrica integration to the application, see the documentation for Android and iOS.