The Log Custom Event Action is one of the ways to gather data on how apps are being used. When the Action is triggered, it logs the occurrence just like any other Event; the record will appear in the Activity section of the Console. Custom Events can also be set to trigger error notifications if they are logged as errors. For more information, check out How to Log a Custom Event Error and send an Email notifier and Configuring App Error Notifications to Slack.
- To log informational events like "Customer gave a 5-star rating on the feedback form". This could be accomplished by using a Condition Action to trigger the Log Custom Event on the desired condition.
- To log exceptional events like "Customer ended their session in the 'Choose Car' Page of the Tow Truck Flow without specifying a car".
- To send an error notification whenever a Custom Event is triggered.
The text that will be logged to the Activity dashboard. This can be a simple string, or any Airscript Expression that returns Text.
The log level of the Custom Event. Custom Events can be marked as INFO, WARNING, or ERROR.
Additionally, if the Custom Event is logged as an ERROR, it can be set to send error notifications when triggered. Error notifications are set up in the Console, under Settings > Logs and App Notifiers. They are configured upon publishing your app.
Additional information logged with the Custom Event. Including metadata is optional, but if included, it must be parsable by Airscript. If metadata is present and cannot be parsed by Airscript, the Custom Event will fail to log properly.
In this example, there's a Error Web Page from where users will enter the custom error message in a Text Area Input field (which will be saved in the
text_area Variable) and then submit it by clicking on a Next Button. The Button, when pressed, will trigger the Log Custom Event Action.
The submitted error will be logged with the other Events.