YMMYandexMetricaReporting protocol
Instance methods
pauseSession() | Pauses the user session. |
reportError(_:exception:onFailure:) | Sends a custom error message. |
reportEvent(_:onFailure:) | Sends a custom event message. |
reportEvent(_:params:onFailure:) | Sends a custom event message with additional parameters. |
reportRevenue(_:onFailure:) | Sends information about the purchase to the AppMetrica server. |
reportUserProfile(_:onFailure:) | Sends information about the user profile update to the AppMetrica server. |
resumeSession() | Resumes the session, or creates a new one if the session timeout has expired. |
setStatisticsSending(_:) | Enables/disables sending statistics to the AppMetrica server. |
setUserProfileID(_:) | Sets the ID of the user profile. If the |
pauseSession() | Pauses the user session. |
reportError(_:exception:onFailure:) | Sends a custom error message. |
reportEvent(_:onFailure:) | Sends a custom event message. |
reportEvent(_:params:onFailure:) | Sends a custom event message with additional parameters. |
reportRevenue(_:onFailure:) | Sends information about the purchase to the AppMetrica server. |
reportUserProfile(_:onFailure:) | Sends information about the user profile update to the AppMetrica server. |
resumeSession() | Resumes the session, or creates a new one if the session timeout has expired. |
setStatisticsSending(_:) | Enables/disables sending statistics to the AppMetrica server. |
setUserProfileID(_:) | Sets the ID of the user profile. If the |
Method descriptions
pauseSession()
func pauseSession()
Pauses the user session.
reportError(_:exception:onFailure:)
func reportError(_ name: String, exception: NSException?, onFailure: ((NSError) -> Void)?)
Sends a custom error message.
name | Short name or description of the error. |
exception | The instance of the NSException class. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
name | Short name or description of the error. |
exception | The instance of the NSException class. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
reportEvent(_:onFailure:)
func reportEvent(_ name: String, onFailure: ((NSError) -> Void)?)
Sends a custom event message.
name | Short name or description of the event |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
name | Short name or description of the event |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
reportEvent(_:params:onFailure:)
func reportEvent(_ name: String, parameters params: [NSObject : AnyObject]?, onFailure: ((NSError) -> Void)?)
Sends a custom event message with additional parameters.
name | Short name or description of the event |
params | Parameters as “key-value” pairs. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
name | Short name or description of the event |
params | Parameters as “key-value” pairs. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
reportRevenue(_:onFailure:)
func reportRevenue(_ revenueInfo: YMMRevenueInfo, onFailure: ((NSError) -> Void)?)
Sends information about the purchase to the AppMetrica server.
revenueInfo | The instance of the YMMRevenueInfo class which contains information about a purchase. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
revenueInfo | The instance of the YMMRevenueInfo class which contains information about a purchase. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
reportUserProfile(_:onFailure:)
func reportUserProfile(_ userProfile: YMMUserProfile, onFailure: ((NSError) -> Void)?)
Sends information about the user profile update to the AppMetrica server.
userProfile | The instance of the YMMUserProfileclass which contains information about the user profile. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
userProfile | The instance of the YMMUserProfileclass which contains information about the user profile. |
onFailure | The block that is executed when an error occurs. The error is passed as a block argument. |
resumeSession()
func resumeSession()
Resumes the session, or creates a new one if the session timeout has expired.
setStatisticsSending(_:)
func setStatisticsSending(_ enabled: Bool)
Enables/disables sending statistics to the AppMetrica server.
enabled | A flag indicating that sending statistics is enabled. The default value is true .Possible values:
|
enabled | A flag indicating that sending statistics is enabled. The default value is true .Possible values:
|
setUserProfileID(_:)
func setUserProfileID(_ userProfileID: String?)
Sets the ID of the user profile.
If the Profileid
isn't sent, predefined attributes aren't displayed in the web interface.
userProfileID | User profile ID. |
userProfileID | User profile ID. |