# Statamic analytics

> Live analytics for Statamic: one addon sends page views, form submissions, sign-ups, crawler visits, 404s and errors, and leaves the control panel and your editors out.

Source: https://status.mettr.app/integrations/statamic

## Install

```bash
composer require mettr/statamic
```

```antlers
<head>
    {{ mettr }}
</head>
```

Add the site's two keys to `.env`, and it sends from production only. Statamic 6, PHP 8.3 or later.

## Everything the Laravel SDK does

The addon is built on [mettr for Laravel](/integrations/laravel): page views and who is online from the script, served through `/_live` on your own domain; sign-ins; 404s and exceptions by class; response times; and crawler visits, named and kept apart from your visitors.

## And for Statamic

- **Form submissions**, by the form's handle: see which form fills up, and from which source. Never what was typed in it.
- **Sign-ups** through Statamic's registration form.
- **No control panel traffic**: the panel's route sends nothing, and people who may use it count as staff, so your editors at work never show up as visitors.

## Your own events

```php
Mettr::event('newsletter', ['list' => 'weekly']);
```

## Open source

`mettr/statamic` is MIT licensed, on [GitHub](https://github.com/mettrhq/mettr-statamic) and [Packagist](https://packagist.org/packages/mettr/statamic). [The full guide](/docs/statamic).
