--- title: "appActionMetricsHandler()" slug: "appactionshandler" updated: 2025-02-17T19:27:58Z published: 2025-02-17T19:27:58Z canonical: "docs.developer.comcast.com/appactionshandler" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.developer.comcast.com/llms.txt > Use this file to discover all available pages before exploring further. # appActionMetricsHandler() ## appActionMetricsHandler() Logs an arbitrary metric to indicate something happening in the X1 Application. #### Signature: `$badger.appActionMetricsHandler(action, args)` #### Parameters: | parameter | description | data type | required? | | --- | --- | --- | --- | | action | The name of the action which was successfully completed | String | Yes | | args | Optional arguments to include. The individual properties in args must be primitives (`string`, `numeric` or `boolean`). Nesting of properties is not supported. | Object | No | #### Return Values: None. #### Usage Example: ``` $badger.appActionMetricsHandler('Email login prompt displayed to the user.', { userChoice: 'ok', emailIdChoice: 'first_email' }); ``` #### Mandatory integration: Must be called whenever a user is interacting with content (playing a game, listening to music, watching a video). See the [App Requirements](/docs/app-requirements) for more detail.