- About the service
- Changelog
- A/B experiments in Varioqub β
- Managing app access
- Platforms
Android iOS- Changelog
- SDK integration
- Usage examples
- Tracking user activity
- Analysis of app crashes
- Device identification using a vendor keychain
- Universal link support
- YMMAdRevenueInfo class
- YMMECommerce class
- YMMECommerceAmount class
- YMMECommerceCartItem class
- YMMECommerceOrder class
- YMMECommercePrice class
- YMMECommerceProduct class
- YMMECommerceReferrer class
- YMMECommerceScreen class
- YMMError class
- YMMMutableAdRevenueInfo class
- YMMMutableReporterConfiguration class
- YMMMutableRevenueInfo class
- YMMMutableUserProfile class
- YMMProfileAttribute class
- YMMReporterConfiguration class
- YMMRevenueInfo class
- YMMUserProfile class
- YMMYandexMetrica class
- YMMYandexMetricaConfiguration class
- YMMYandexMetricaPreloadInfo class
Unity Flutter React Native
Working with reports Working with the API Support and troubleshooting
YMMYandexMetricaConfiguration class
This class contains the extended startup configuration for the library.
The parameters of the extended configuration are applied from the time of library initialization.
Instance methods
Initializes an instance of the class |
Properties
The API key of the application. |
|
Defines the application type as |
|
A flag that enables/disables the automatic collection and sending of information about app launches via a deeplink. |
|
App version. |
|
Enables/disables collecting and sending information about app crashes. |
|
Defines the AppMetrica SDK initialization as the beginning of a user session. |
|
Defines the first launch of the app as an update. |
|
The maximum number of error reports stored in the internal DB. |
|
Sets custom location of the device. |
|
Enables/disables sending location of the device. |
|
Enables/disables logging the activity of the library. Logging is disabled by default. |
|
Sets the instance of the YMMYandexMetricaPreloadInfo class for tracking pre-installed apps. |
|
Enables/disables the automatic collection of information about In-App purchases. The option is enabled by default. |
|
Enables/disables automatic tracking of the application lifecycle. The option is enabled by default. |
|
Sets the session timeout in seconds. |
|
Enables/disables sending statistics to the AppMetrica server. |
|
Sets the ID of the user profile ( |
Method descriptions
init?(apiKey:)
public init?(apiKey: String)
Initializes the instance of the YMMYandexMetricaConfiguration
class with the specified API key.
Parameters:
|
The API key of the application. |
Returns:
The instance of the YMMYandexMetricaConfiguration
class.
Property descriptions
apiKey
var apiKey: String { get }
The API key of the application.
appForKids
var appForKids: Bool
Defines the application type as children's
to match the rules for checking children's apps. If this option is enabled, the AppMetrica SDK doesn't send advertising IDs or location information.
Note
Use this property if you have an app for kids.
appOpenTrackingEnabled
var appOpenTrackingEnabled: Bool
Enables/disables the automatic collection and sending of data about app launches via a deeplink.
Alert
Automatic tracking captures only those deeplinks that resulted in app launches. To track the deeplinks inside the running application, also set up tracking.
The option is enabled by default.
Possible values:
YES
— Automatic collection and sending of data about the app launch via a deeplink is enabled.NO
— Automatic collection and sending of data about the app launch via a deeplink is disabled.
appVersion
var appVersion: String?
App version.
crashReporting
var crashReporting: Bool
Enables/disables collecting and sending information about app crashes.
Possible values:
YES
— Sending information about crashes is enabled.NO
— Sending information about crashes is disabled.
handleActivationAsSessionStart
var handleActivationAsSessionStart: Bool
Defines the AppMetrica SDK initialization as the beginning of a user session.
This option is disabled by default.
Possible values:
YES
— The user session is created when the library is initialized.NO
— A background session is created when the library initializes, and a user session is created after a UIApplicationDidBecomeActiveNotification system event.
handleFirstActivationAsUpdate
var handleFirstActivationAsUpdate: Bool
Defines the AppMetrica SDK initialization as the beginning of a session.
This option is disabled by default.
Possible values:
YES
— The first launch is defined as an update.NO
— The first launch is defined as a new installation.
maxReportsInDatabaseCount
var maxReportsInDatabaseCount: UInt
The maximum number of error reports stored in the internal DB.
The allowed range of values is [100; 10000]. Values outside this range are automatically replaced with values from the nearest range limits.
Default value: 1000.
Note
Separate databases are used for various apiKeys
and independent limits on the number of events can be set for them. This parameter only affects the limitation for the corresponding apiKey
. To change the maximum allowed number of events for other apiKeys
, use YMMReporterConfiguration.maxReportsInDatabaseCount.
location
var location: CLLocation?
Sets custom location of the device.
locationTracking
var locationTracking: Bool
Enables/disables sending location of the device.
By default, sending is enabled.
logs
var logs: Bool
Enables/disables logging the activity of the library.
Logging is disabled by default.
preloadInfo
var preloadInfo: YMMYandexMetricaPreloadInfo?
Sets the instance of the YMMYandexMetricaPreloadInfo class for tracking pre-installed apps.
For more information, see Tracking pre-installed apps.
revenueAutoTrackingEnabled
var revenueAutoTrackingEnabled: Bool
Enables/disables the automatic collection of information about In-App purchases.
The option is enabled by default.
Possible values:
YES
— Automatic collection and sending of information about In-App purchases is enabled.NO
— Automatic collection and sending of information about In-App purchases is disabled.
sessionsAutoTracking
var sessionsAutoTracking: Bool
Enables/disables automatic tracking of the application lifecycle.
The option is enabled by default.
If the option is disabled, you should manually set up session control using the methods +pauseSession: and +resumeSession:. For more information, see Manual session tracking.
AppMetrica uses UIApplicationDidBecomeActiveNotification and UIApplicationWillResignActiveNotification to track sessions. The maximum session length is 24 hours. To extend the session after 24 hours, invoke the +resumeSession: method manually.
sessionTimeout
var sessionTimeout: UInt
Sets the session timeout in seconds.
The default value is 10
(minimum allowed value).
For more information about sessions, see Tracking user activity.
statisticsSending
var statisticsSending: Bool
Enables/disables sending statistics to the AppMetrica server.
Note
Disabling sending also turns off sending data from all reporters that initialized with the other apiKey
.
userProfileID
var userProfileID: String?
Sets the ID of the user profile (ProfileID
) when activated.
Alert
The maximum length of the ProfileID
string is 200 characters.
Was the article helpful?
- Instance methods
- Properties
- Method descriptions
- init?(apiKey:)
- Property descriptions
- apiKey
- appForKids
- appOpenTrackingEnabled
- appVersion
- crashReporting
- handleActivationAsSessionStart
- handleFirstActivationAsUpdate
- maxReportsInDatabaseCount
- location
- locationTracking
- logs
- preloadInfo
- revenueAutoTrackingEnabled
- sessionsAutoTracking
- sessionTimeout
- statisticsSending
- userProfileID