# Product events

> Send your product's own events from the server, with the user and their properties: sign-ups, upgrades, exports. Live on the dashboard, in funnels and breakdowns, beyond the reach of ad blockers.

Source: https://status.mettr.app/features/events

## Page views are half the story

A web analytics script sees the pages. It does not see that someone created a project, invited two teammates and exported a report, because that happened in your backend. mettr takes those events from your server, where they actually happen, next to the page views from the browser.

```php
use Mettr\Laravel\Facades\Mettr;

Mettr::event('project.created', ['plan' => 'pro', 'template' => 'blank']);
```

```bash
curl https://mettr.app/api/v1/events \
  -H "Authorization: Bearer $METTR_SECRET_KEY" \
  -d '{"type": "event", "name": "export", "user_id": "4821", "props": {"format": "csv"}}'
```

## Sent from the server, so they arrive

Events from your server do not depend on a browser: no ad blocker, privacy extension or closed tab can drop them. The visitor's address and browser go with each event to place it in their visit and their country, then the address is dropped.

## With the user and what matters

Each event can carry your own user id and up to 30 properties: the plan, the format, the step, the size. Group and filter by any of them: sign-ups by plan, exports by format, errors by class.

## Live, then in panels

Events show up in the feed the moment they are sent. The event catalog learns their names and properties on its own, and the panel builder turns them into:

- **numbers** against the usual for that time ("sign-ups today, against a normal Tuesday");
- **charts** over time against the period before;
- **bars** split by a property;
- **top lists** of a property's values;
- **funnels** across events and pages: visited pricing, started checkout, paid.

Give an event a name of your own by what its properties say, a `run` with errors as **Validation failed**, with [labels](/features/labels): drawn your way in the feed, and counted as an event of its own.

## The Laravel SDK sends the rest

`mettr/laravel` sends sign-ins and sign-ups, 404s and exceptions (by class, never the message), failed queue jobs, response times and crawler visits without a line of your code, all after the response has gone so visitors never wait. For any other stack there are SDKs for [Node.js](/integrations/node), [Next.js](/integrations/nextjs), [Python](/integrations/python), [Ruby](/integrations/rails), [Go](/integrations/go) and [plain PHP](/docs/php), and the [Events API](/docs/events-api) takes the same events from anything else.

## Your history too

Already logging events in your database? The [Import API](/docs/import-api) brings them in, a thousand a batch, each with its own id so a second run adds nothing twice. The [Laravel SDK](/integrations/laravel) imports `spatie/laravel-activitylog` with one command.

## What it costs

Events are what the plans count: 50,000 a month free, and on Pro and Business as many as you pick, from 100k to 20M. Presence heartbeats, scroll depth, crawler visits, bots and imported history are not counted. [See pricing](/pricing).
