Built-In Events
The following events are automatically fired by Critical Moments, and can be used for triggers or conditions.
Watching events in debug mode can help you vizualize all the built-in events as they fire.
App Lifecycle Events
app_start
: fired immediatly after the SDK starts. There may be a small delay while we fetch the latest config over the network.session_start
: fired when a user session starts. This is both when the app is initially launced, and if the app enters the foreground after 10 mintues or more in the background.app_entered_foreground
: fired when the app enters the forground, including the initial launchapp_entered_background
: fired when the app enters the backgroundapp_terminated
: fired right before the app is terminated (evicted from memory)
Feature Flag Events
ff_true:[condition_name]
: Fired when a feature flag is evaluated with checkNamedCondition and returns true. Latter half of the string is the condition name which was evaluated.ff_false:[condition_name]
: Fired when a feature flag is evaluated with checkNamedCondition and returns true. Latter half of the string is the condition name which was evaluated.ff_error:[condition_name]
: Fired when a feature flag is evaluated with checkNamedCondition and returns true. Latter half of the string is the condition name which was evaluated.
Action Events
action:[action_name]
: Fired when a named action is performed. For example, if you fired an action namedgdpr_banner
, the event log would have an event foraction:gdpr_banner
action_error:[action_name]
: Fired when we attempt to perform a named action, but there is an error.
App Review Action
system_app_review_requested
: fired when any app review action is fired.
Banner Actions
sub-action:[action_name]:tapped
: fired when a banner is tapped.sub-action:[action_name]:closed
: fired when a banner is closed.
Alert Actions
sub-action:[action_name]:button:[button_label]
: fired when a button is tapped on an alert. The button_label is the string label of the button. The "OK" and "Cancel" strings are not localized in events, unlike UI, so the database is consistent across locales.sub-action:[action_name]:button_index:[button_index]
: fired when a button is tapped on an alert. The button_index is the index of the button tapped. The custom button array starts at index 0, the OK button has a constant value -1, and the Cancel button has a constant value -2.
Modal Actions
sub-action:[action_name]:closed
: fired when a modal is closed.sub-action:[action_name]:button:[button_label]
: fired when a button is tapped on an modal. The button_label is the string label of the button.sub-action:[action_name]:button_index:[button_index]
: fired when a button is tapped on an modal. The button_index is the index of the button tapped. Not fired for the "close" button (see theclosed
event above).
Last updated