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
-initWithApiKey: | Initializes the instance of the |
-initWithApiKey: | Initializes the instance of the |
Properties
apiKey | The API key of the application. |
appForKids | 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 | Enables/disables the automatic collection and sending of data about app launches via a deeplink. |
appVersion | App version. |
crashReporting | Enables/disables collecting and sending information about app crashes. |
handleActivationAsSessionStart | Defines the AppMetrica SDK initialization as the beginning of a user session. |
handleFirstActivationAsUpdate | Defines the first launch of the app as an update. |
maxReportsInDatabaseCount | The maximum number of error reports stored in the internal DB. |
location | Sets custom location of the device. |
locationTracking | Enables/disables sending location of the device. |
logs | Enables/disables logging the activity of the library. |
preloadInfo | Sets the instance of the YMMYandexMetricaPreloadInfo class for tracking pre-installed apps. |
revenueAutoTrackingEnabled | Enables/disables the automatic collection of information about In-App purchases. |
sessionsAutoTracking | Enables/disables automatic tracking of the application lifecycle. |
sessionTimeout | Sets the session timeout in seconds. |
statisticsSending | Enables/disables sending statistics to the AppMetrica server. |
userProfileID | Sets the ID of the user profile ( |
apiKey | The API key of the application. |
appForKids | 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 | Enables/disables the automatic collection and sending of data about app launches via a deeplink. |
appVersion | App version. |
crashReporting | Enables/disables collecting and sending information about app crashes. |
handleActivationAsSessionStart | Defines the AppMetrica SDK initialization as the beginning of a user session. |
handleFirstActivationAsUpdate | Defines the first launch of the app as an update. |
maxReportsInDatabaseCount | The maximum number of error reports stored in the internal DB. |
location | Sets custom location of the device. |
locationTracking | Enables/disables sending location of the device. |
logs | Enables/disables logging the activity of the library. |
preloadInfo | Sets the instance of the YMMYandexMetricaPreloadInfo class for tracking pre-installed apps. |
revenueAutoTrackingEnabled | Enables/disables the automatic collection of information about In-App purchases. |
sessionsAutoTracking | Enables/disables automatic tracking of the application lifecycle. |
sessionTimeout | Sets the session timeout in seconds. |
statisticsSending | Enables/disables sending statistics to the AppMetrica server. |
userProfileID | Sets the ID of the user profile ( |
Method descriptions
-initWithApiKey:
- (instancetype)initWithApiKey:(NSString *)apiKey
Initializes the instance of the YMMYandexMetricaConfiguration
class with the specified API key.
apiKey | The API key of the application. |
apiKey | The API key of the application. |
Returns:
The instance of the YMMYandexMetricaConfiguration
class.
Property descriptions
apiKey
(nonatomic, copy, readonly) NSString *apiKey
The API key of the application.
appForKids
(nonatomic, assign) BOOL appForKids
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.
appOpenTrackingEnabled
(nonatomic, assign) BOOL appOpenTrackingEnabled
Enables/disables the automatic collection and sending of data about app launches via a deeplink.
The option is enabled by default.
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
(nonatomic, copy) NSString *appVersion
crashReporting
(nonatomic, assign) BOOL crashReporting
Enables/disables collecting and sending information about app crashes.
YES
— Sending information about crashes is enabled.NO
— Sending information about crashes is disabled.
handleActivationAsSessionStart
(nonatomic, assign) BOOL handleActivationAsSessionStart
Defines the AppMetrica SDK initialization as the beginning of a user session.
This option is disabled by default.
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
(nonatomic, assign) BOOL handleFirstActivationAsUpdate
Defines the first launch of the app as an update.
If the first launch of the app is defined as an update, the installation is not shown as a new installation in reports, and is not attributed to partners.
YES
— The first launch is defined as an update.NO
— The first launch is defined as a new installation.
maxReportsInDatabaseCount
@property (assign, readwrite, nonatomic) NSUInteger maxReportsInDatabaseCount;
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.
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
(nonatomic, strong, nullable) CLLocation *location
Sets custom location of the device.
locationTracking
(nonatomic, assign) BOOL locationTracking
Enables/disables sending location of the device.
By default, sending is enabled.
logs
(nonatomic, assign) BOOL logs
Enables/disables logging the activity of the library.
Logging is disabled by default.
preloadInfo
(nonatomic, copy) YMMYandexMetricaPreloadInfo *preloadInfo
Sets the instance of the YMMYandexMetricaPreloadInfo class for tracking pre-installed apps.
For more information, see Tracking pre-installed apps.
revenueAutoTrackingEnabled
(nonatomic, assign) BOOL revenueAutoTrackingEnabled
Enables/disables the automatic collection of information about In-App purchases.
The option is enabled by default.
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
(nonatomic, assign) BOOL sessionsAutoTracking
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
(nonatomic, assign) NSUInteger sessionTimeout
The default value is 10
(minimum allowed value).
For more information about sessions, see Tracking user activity.
statisticsSending
(nonatomic, assign) BOOL statisticsSending
Enables/disables sending statistics to the AppMetrica server.
apiKey
.userProfileID
(nonatomic, copy, nullable) NSString *userProfileID
Sets the ID of the user profile (ProfileID
) when activated.
ProfileID
string is 200 characters.