<h1 align="center">Otter Analytics</h1>
<p align="center">
  <img src="https://raw.githubusercontent.com/AmadeusITGroup/otter/main/assets/logo/otter.png" alt="Super cute Otter!" width="40%"/>
</p>

This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/otter/tree/main/docs/core/MODULE.md).

<br />
<br />

## Description

[![Stable Version](https://img.shields.io/npm/v/@o3r/analytics?style=for-the-badge)](https://www.npmjs.com/package/@o3r/analytics)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/analytics?color=green&style=for-the-badge)](https://www.npmjs.com/package/@o3r/analytics)

This module provides a framework to capture, store and report multiple events (ui, performance etc.) emitted by an [Otter Application](https://github.com/AmadeusITGroup/otter).

## How to install

```shell
ng add @o3r/analytics
```

> [!WARNING]
> This module requires [@o3r/core](https://www.npmjs.com/package/@o3r/core) to be installed.

## Generators

Otter framework provides a set of code generators based on [Angular schematics](https://angular.io/guide/schematics).

| Schematics                 | Description                                                    | How to use                        |
| -------------------------- | -------------------------------------------------------------- | --------------------------------- |
| add                        | Include Otter analytics module in a library / application.     | `ng add @o3r/analytics`           |
| analytics-to-component     | Add analytics to an Otter component                            | `ng g analytics-to-component`     |

## More information

Find more information in the [documentation](https://github.com/AmadeusITGroup/otter/tree/main/docs/analytics/ANALYTICS.md).
