> ## Documentation Index
> Fetch the complete documentation index at: https://tinyanalytics.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics Alerts

> Watch traffic, page, event, revenue, or account activity and get notified when it crosses a threshold by email, Slack, Discord, or webhook.

An alert watches one metric on your site and notifies you when it crosses a threshold — across the whole site, on a page path, or for a specific event. tinyanalytics delivers the alert by **email, Slack, Discord, or webhook** and sends an all-clear when the metric returns to normal.

## Start from a template

The create dialog starts with seven templates that prefill the metric, condition, and alert name:

* **Traffic spike +50%**
* **Traffic drop −50%**
* **Page traffic**
* **Event volume**
* **Event users**
* **Revenue −20%**
* **Blank**

After choosing one, complete the three sections: **What to watch**, **When to notify**, and **Where to notify**. Open **Advanced** to change the window, check cadence, cooldown, or saved segment. When you edit an alert with non-default advanced settings, that section opens automatically.

## What can you alert on?

Pick the metric to watch and the window to measure it over — the last **hour** or the last **day**:

| Metric              | Fires on changes in…                                                        |
| ------------------- | --------------------------------------------------------------------------- |
| **Sessions**        | visit volume                                                                |
| **Users**           | unique visitors                                                             |
| **Pageviews**       | total pageviews                                                             |
| **Bounce rate**     | the share of single-page sessions                                           |
| **Event count**     | how often a named [custom event](/docs/custom-event-tracking) happens            |
| **Event users**     | distinct users who fired a named custom event                               |
| **Revenue**         | total client-event [revenue](/docs/revenue-analytics) in your reporting currency |
| **Active accounts** | distinct [B2B accounts](/docs/b2b-account-analytics) active                      |

<Note>
  Alert windows roll backwards from the current moment — the last hour or the
  last day — so they never depend on where a calendar day begins. Your site's
  [reporting timezone](/docs/analytics-site-settings#which-timezone-are-my-reports-based-on)
  changes your charts and [scheduled reports](/docs/scheduled-analytics-reports), but leaves
  alerts untouched.
</Note>

## Scope an alert to a page or event

For a page-specific alert, add a **Page path** and choose **is**, **contains**, or **starts with**. The path scope is available for non-event metrics and can also be used with event metrics.

For **Event count** or **Event users**, enter the event name and optionally add up to five property filters. Property filters use exact key/value matches, all joined with **AND**. For example, an event-users alert can watch distinct users who fired `checkout_failed` with both `plan = pro` and `country = DE`.

<Warning>
  A saved segment overrides the inline page-path scope; they do not combine.
  When you choose a segment under **Advanced**, tinyanalytics disables the Page
  path row.
</Warning>

## Set the condition

An alert fires when the metric crosses a bound you define, in one of two ways:

* **Absolute** — the value goes above an upper bound or below a lower bound (for example, sessions in the last hour drop below 50).
* **Relative** — the value changes by more than a percentage versus the previous equal window (for example, pageviews jump more than 40% hour over hour).

You can preview the current value and whether it would breach **as you type the thresholds**, and send a **test notification** to confirm your channels work before you rely on the alert.

## How often can an alert fire?

* tinyanalytics checks each alert **every minute**. It **fires** once when the metric first breaches, then holds until the metric recovers — it won't re-fire every minute.
* When the metric returns within bounds, tinyanalytics sends a **recovery** all-clear.
* A **cooldown** (12 hours by default) keeps a flapping metric from spamming you: a repeat breach inside the cooldown is suppressed. Recovery notices are never suppressed.

A fire notification includes the site, watched metric, window, breach reason, and the top pages and referrers at the time, so you can start investigating from the message itself. Email alerts include a direct **View alert** link. Recovery messages clearly mark the alert as resolved and do not repeat stale spike context.

<Note>
  Revenue alerts currently measure revenue sent with client [custom
  events](/docs/revenue-analytics#choose-a-revenue-source). Revenue received through the
  [Stripe integration](/docs/stripe-revenue-analytics) is not included.
</Note>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Why is my tinyanalytics alert not firing again?">
    An alert fires **once** when the metric first breaches, then holds until the
    metric recovers — it won't re-fire every minute. A **cooldown**, 12 hours by
    default, also suppresses a repeat breach that happens inside the cooldown
    window. Recovery notices are never suppressed.
  </Accordion>

  <Accordion title="How do I test that my alert notifications work?">
    Send a **test notification** from the alert before you rely on it.
    tinyanalytics delivers alerts by email, Slack, Discord, or webhook, and the
    test confirms your channels are wired up. You can also preview the current
    metric value and whether it would breach as you type the thresholds.
  </Accordion>

  <Accordion title="What's the difference between an absolute and a relative alert?">
    An **absolute** alert fires when the value crosses a fixed bound you set —
    for example, sessions in the last hour drop below 50. A **relative** alert
    fires when the value changes by more than a percentage versus the previous
    equal window — for example, pageviews jump more than 40% hour over hour.
  </Accordion>

  <Accordion title="How quickly does tinyanalytics detect a breach?">
    tinyanalytics checks each alert **every minute**. You choose whether the
    metric is measured over the last **hour** or the last **day**, and the check
    runs against that window every minute.
  </Accordion>

  <Accordion title="What's the difference between Event count and Event users?">
    **Event count** counts every matching event occurrence. **Event users**
    counts distinct users who fired the named event. Both can be narrowed with
    up to five exact-match event property filters, joined with AND.
  </Accordion>

  <Accordion title="Can I alert on one page without creating a segment?">
    Yes. Add a Page path and choose **is**, **contains**, or **starts with**. A
    saved segment is still available for more complex scopes, but selecting one
    overrides and disables the inline page-path filter.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Scheduled reports" icon="envelope" href="/docs/scheduled-analytics-reports">
    Get a routine digest instead of a threshold alert.
  </Card>

  <Card title="Uptime monitoring" icon="heart-pulse" href="/docs/website-api-uptime-monitoring">
    Alert when your site or API goes down.
  </Card>

  <Card title="Group & B2B analytics" icon="building" href="/docs/b2b-account-analytics">
    Alert when an account goes quiet.
  </Card>

  <Card title="Custom events" icon="hand-pointer" href="/docs/custom-event-tracking">
    Send the events an event-count alert watches.
  </Card>
</Columns>


## Related topics

- [Website and API Uptime Monitoring](/docs/website-api-uptime-monitoring.md)
- [B2B and Account Analytics](/docs/b2b-account-analytics.md)
- [Stripe Revenue Analytics Integration](/docs/stripe-revenue-analytics.md)
