# Metrics Module

The Metrics Module displays an overview of all available metrics (`ip-metric`). It may also show a reminder block prompting the user to perform a new face scan. This reminder is only displayed when there are metrics with confidence that can still improve and the user has not yet completed a face scan on that day.

## Set-up

### Events

| **Name** | **Description** |
| --- | --- |
| `ip:start-facescan` | This event is emitted when the reminder block is visible and the user clicks the call-to-action. The call-to-action button will only be visible if the event listener is added to `ip-metrics-module` or `ip-dashboard`. Listening on a higher ancestor will receive the event but will not reveal the button.  
  
**Ensure the event listener script uses** **`type="module"`** **to guarantee it runs after the components are registered.** |

### Usage

```html
<ip-session
  action-token="eyJhbG..."
  language="en-GB"
>
  <!-- IntelliProve components go here -->
  <ip-metrics-module></ip-metrics-module>
</ip-session>


<script type="module">
  document
    .querySelector("ip-metrics-module")
    .addEventListener("ip:start-facescan", () => {
      alert("CTA clicked — open your scan flow here");
  });
</script>
```
