> For the complete documentation index, see [llms.txt](https://dev-stagecast.gitbook.io/moments-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-stagecast.gitbook.io/moments-sdk/documentation/api-reference/analytics.md).

# Analytics

Analytics allow you to track actions performed by the user that will be then grouped and presented to the event organizers as Moment-specific reports

### `track(): void`

Used to track activities.

**Params**:

* **`action`**: any string that describes the action (no spaces)
* **`options`**
  * **`category`**: the event category&#x20;
  * **`value`**: a numeric value representing the event&#x20;
  * **`label`**: a string describing the action&#x20;
  * **`bundleId`**: the name of you Moment code

```javascript
document.querySelector("#testButton").onclick = function(event) {
    const action = 'test_button_click';
    let options = {
        category: 'generic_click_event',
        value: 1,
        label: 'Test Button clicked',
        bundleId: 'com.stagecast.demo_example'
    };
    
    SDK.analytics.track(action, options);
}
```
