Critical Moments Docs
Quick StartHomepageAccount
  • Documentation Home
  • What is Critical Moments?
  • Quick Start
  • Concepts Overview
  • Remote Control / Service
    • Host Config on Github Pages
  • Config File Structure
  • Demo App
  • Homepage & Account
  • 📚Guides
    • Mobile App Toolbox: 13 Features Most Apps Need
    • Reduce App Churn with Notifications
    • Improve your App Store Rating
    • Feature Flags Guide
  • ⏰Notifications
    • Intro to Notifications
    • Notifications Spec
    • Smart Delivery
    • Badges
  • 🎯Conditional Targeting
    • Intro to Conditions
    • Built-in Properties
    • Custom Properties
    • Syntax and Operators
    • Conditional Guides
      • Working with Dates
      • Locations and Weather
      • Event and Property History
  • 🎪Events
    • Event Overview
    • Recommended Events
    • Built-In Events
  • 💬Actions / In App Messaging
    • Actions Overview
    • Modals
      • Modal Content Sections
      • Modal Buttons
      • Modal Images
    • Banners
    • Alerts
    • App Reviews
    • Open Link
    • Custom Actions
    • Conditional Actions
    • Triggers
  • 🎨Themes
    • Theme Overview
    • Built In Themes
  • ⛳Feature Flags
    • Feature Flag Guide
    • Conditional Feature Flags
    • Named Conditions Config
  • 🔑Trustless SaaS
  • 👋Support
  • 👩‍💻SDK API Reference
Powered by GitBook
On this page
  • App Lifecycle Events
  • Feature Flag Events
  • Action Events
  • Notification Events

Was this helpful?

  1. Events

Built-In Events

Last updated 8 months ago

Was this helpful?

The following events are automatically fired by Critical Moments, and can be used for triggers or conditions.

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 launch

  • app_entered_background: fired when the app enters the background

  • app_terminated: fired right before the app is terminated (evicted from memory). Note: the OS will not fire this event in some cases including if the user manually closes the app, or if the app was suspended prior to termination.

Feature Flag Events

  • ff_true:[condition_name]: Fired when a feature flag is evaluated with 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 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 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 named gdpr_banner, the event log would have an event for action:gdpr_banner

  • action_error:[action_name]: Fired when we attempt to perform a named action, but there is an error.

App Review Action

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 the closed event above).

Notification Events

system_app_review_requested: fired when any is fired.

notifications:tapped:[notification_id]: fired when a notification is tapped. The notification id is the of the notification. For notifications created in Critical Moments the ID format is io.criticalmoments.notifications.[notification_name].

🎪
app review action
UNNotificationRequest identifier
checkNamedCondition
checkNamedCondition
checkNamedCondition
Watching events