Alert Thresholds#
Get notified when your traffic metrics cross a threshold. Alerts are checked daily during the midnight rollup. In managed mode, creating an alert requires a Pro or Team plan. Alerts that already exist stay configured if the account lapses.
Create an Alert#
curl -X POST https://antics-api.turtletech.us/api/alerts \
-H "Authorization: Bearer $ANTICS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"site_id": "YOUR-SITE-ID",
"metric": "visitors",
"operator": "lt",
"threshold": 10,
"email": "you@example.com"
}'
Metrics#
visitors– daily unique visitorspageviews– daily total pageviewsbounce_rate– daily bounce rate percentagevisitors_change_pct– visitor percentage change from the preceding daypageviews_change_pct– pageview percentage change from the preceding daybounce_rate_change_pct– bounce-rate percentage change from the preceding dayvisitors_weekday_pct– visitor percentage change from the same weekday one week earliervisitors_same_weekday_pct– percent versus the mean of the same weekday over the previous four weeks. A week with no stored row is left out. A stored zero counts. When every week is missing, the alert does not fire. A spike usesgtand a positive threshold. A drop usesltand a negative threshold. The absolute value is at most 1000.visitors_trailing_pct– visitor percentage change from the average of the previous daysgoal_conversions– distinct visitors who matched any goal that daygoal_conversion_pct– those conversions as a percent of the day’s visitorsfunnel_conversion_pct– completed visitors as a percent of visitors who entered a saved funnelnew_top_referrer– visitor count of a referrer domain that was not among the five busiest on that same weekday
A drop uses lt and a negative threshold, for example -30. A spike uses gt and a positive percent. min_volume is the smallest baseline, visitor count, or funnel entry count that may fire. baseline_days is the trailing window, from 1 to 28, and blank means 7. A funnel rule sets funnel_id to a funnel saved on that site. A new referrer uses gt and the minimum visitor count. None of these messages include a visitor identifier, a goal id, or a goal pattern.
The Alerts page can mute a rule or snooze it for 1 to 30 days. A muted rule does not fire. A snoozed rule stays quiet until that time, and the day is still eligible after the snooze ends. POST /alerts/:id/mute, POST /alerts/:id/unmute, and POST /alerts/:id/snooze are the same actions. Snooze reads days. An editor can use them. A viewer cannot.
Operators#
lt– less than (alert when metric drops below threshold)gt– greater than (alert when metric exceeds threshold)
Notifications are delivered to the email address configured on the alert.
An alert may also include a webhook URL when it is created or updated.
The webhook body is the raw JSON, signed with HMAC-SHA256. The
X-Antics-Signature header is sha256= plus the hex digest. The signing
secret is returned with the rule. A host that does not resolve is retried,
up to eight attempts. A response that might already have been accepted is
not sent again.
POST /api/alerts/:id/test queues one sample on each configured channel
and tries it immediately. The sample is not a traffic measurement, and it
does not move the daily cooldown. The same action is the Send test
button on GET /alerts.
Dashboard#
Manage alerts from the Alerts page in the dashboard. Create rules, mute or snooze them, view trigger history, and delete alerts. Fires from the week are also a section of the weekly report.
Delivery state and history#
Each evaluated alert channel has one durable current delivery state. Pending deliveries can retry; delivered, failed, undeliverable, and unknown are terminal states. The dashboard summary exposes those current channel states separately from trigger history.
GET /api/alerts/history is append-only: it retains the initial pending
event and every later transition. A completed delivery therefore has both its
pending event and its terminal event in history. GET /api/alerts/summary
returns that history plus deliveries, which has one current row per alert,
local day, and channel. History and delivery projections each return their
50 most recent accessible rows.
A watch is checked every hour by the same loop that samples storage. It compares yesterday’s visits, or one goal’s conversions, with the mean of the previous seven local days, or it counts missing pages in the last complete hour. A firing is listed with the other alerts on the dashboard and handed to the same mailer as a scheduled report. The default mailer accepts the message and does not contact a server.