# Quick start

> From a new account to your first live visitor in five minutes: add a site, put the script on your pages, send one event from your server.

Source: https://mettr.app/docs/quick-start

## 1. Create an account and a site

[Sign up](/register) with Google, GitHub, LinkedIn or an email and password. Your account comes with a team of its own, on the Free plan.

Open **Sites** and choose **Add site**. Give it:

- a **name**, as you want to see it on the dashboard;
- its **domains**, one per line (`example.com`; subdomains are included). The browser script only sends from these;
- its **time zone**, where your days and hours start.

## 2. Add the browser script

In the site's settings, under **Tracking**, copy the browser script and put it in the `<head>` of every page:

```html
<script defer data-key="pk_your_site_key" src="https://mettr.app/script.js"></script>
```

That is all page views need. Open your site in another tab and watch the dashboard: you show up under **Online** within seconds, with your page, country and device.

Using a JavaScript bundler? `npm install @mettr/browser` does the same from your code: see [JavaScript](/docs/javascript). On Laravel, the [Laravel SDK](/docs/laravel) adds the script for you with `@mettr`.

## 3. Send your product's events

Page views say where people go. Your product's events say what they do. From the page:

```js
window.mettr('event', 'signup', { plan: 'pro' });
```

From your server, which nothing can block, make a **secret key** under **Tracking**, **Secret keys** (it is shown once), and send with an SDK or a plain request:

```bash
curl https://mettr.app/api/v1/events \
  -H "Authorization: Bearer $METTR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "event", "name": "signup", "props": {"plan": "pro"}}'
```

The event is on the dashboard's feed as it lands, and the event catalog learns its name and props, so you can build panels on it.

## 4. Leave yourself out

Your own visits would skew small numbers. Best leave them out on your site's side: with the Laravel SDK, a [staff gate](/docs/laravel#staff) keeps them from being sent at all. Otherwise, in the site's settings, under **General**, **Staff**, list your user ids (as your server sends them; past events too) or your addresses and ranges (from then on, since addresses are never stored): they are left out of every number. In a browser of your own, `localStorage.mettr_ignore = "true"` in the console stops that browser from sending anything.

## Next

- [The dashboard](/docs/dashboard): tiles, the traffic chart, filters and your own panels.
- [Alerts and reports](/docs/alerts-and-reports): hear when nobody is online, or 404s spike.
- [Revenue](/docs/revenue): MRR beside traffic, with the source of each paying customer.
