YandexMetrica.YandexMetricaConfig class

yandex.metrica

public class YandexMetrica.YandexMetricaConfig

This class contains the extended startup configuration for the library.

Methods

voidSetCustomLocation(YandexMetrica.Location location)

Задает собственную информацию о местоположении устройства.

Properties

GuidApiKey

The API key of the application.

boolCrashTracking

Sets/returns a flag indicating the status of tracking unhandled exceptions.

stringCustomAppId

Sets/returns the app ID.

VersionCustomAppVersion

Sets/returns the app version.

boolHandleFirstActivationAsUpdate

Sets/returns a flag indicating that the first launch of the app is an update (not an installation).

VersionLibraryVersion

Returns the current version of the AppMetrica library.

boolLocationTracking

Sets/returns a flag indicating the status of device location tracking.

boolOfflineMode

Sets/returns a flag indicating the status of sending statistics to the AppMetrica server.

TimeSpanSessionTimeout

Sets/returns the session timeout in seconds.

Method descriptions

SetCustomLocation

public void SetCustomLocation(YandexMetrica.Location location)

Sets custom location of the device.

Parameters:
locationInformation about the location of the device.

Property descriptions

ApiKey

public Guid ApiKey { get; }

The API key of the application.

CrashTracking

public bool CrashTracking { get; set; }

Sets/returns a flag indicating the status of tracking unhandled exceptions.

The default value is true.

Possible values:
  • true — Monitoring unhandled exceptions is enabled.
  • false — Monitoring unhandled exceptions is disabled.

CustomAppId

public string CustomAppId { get; set; }

Sets/returns the app ID.

Default value:
  • For mobile apps is a package name.
  • For desktop applications is a name of the main build.

CustomAppVersion

public Version CustomAppVersion { get; set; }

Sets/returns the app version.

The default version is the app version specified in the AssemblyInfo.cs file for the application's main build.

HandleFirstActivationAsUpdate

public bool HandleFirstActivationAsUpdate { get; set; }

Sets/returns a flag indicating that the first launch of the app is an update (not an installation).

The default value is false.

Possible values:
  • true — The first launch is defined as an update.
  • false — The first launch is defined as a new installation.

LibraryVersion

public Version LibraryVersion { get; }

Returns the current version of the AppMetrica library.

LocationTracking

public bool LocationTracking { get; set; }

Sets/returns a flag indicating the status of device location tracking.

The default value is true.

Possible values:
  • true — Monitoring unhandled exceptions is enabled.
  • false — Monitoring unhandled exceptions is disabled.

OfflineMode

public bool OfflineMode { get; set; }

Sets/returns a flag indicating the status of sending statistics to the AppMetrica server.

The default value is false.

Possible values:
  • true — Sending statistics is disabled.
  • false — Sending statistics is enabled.

SessionTimeout

public TimeSpan SessionTimeout { get; set; }

Sets/returns the session timeout in seconds.

The default value is 10 (minimum allowed value).