Hourly
Find out when a key Amplitude event stops firing
If Purchase events drop to zero or far below normal, you hear about it within the hour.
- Runs
- Hourly
- Apps
- Amplitude
- AI
- Not needed
- Access
- API key + secret
Send this to your assistant
Create a ClickRuntime automation: every hour, count Purchase events in Amplitude and message me in Slack if the count is zero or less than half the usual for that hour.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
The events that Amplitude counts are only useful as long as they keep arriving. A key event such as Signup Completed or Checkout Started can go quiet because a developer renamed it, an SDK update dropped the tracking call, a consent banner now blocks analytics, or a release broke the button that fires it. Dashboards then show a flat line, funnel numbers shrink, and product decisions over the next weeks are made on data that is wrong. Nobody gets a notice from Amplitude when an event disappears.
Every hour, the automation queries the counts for the events you list, compares the latest hour with what is normal for that time, and posts to Slack if an event drops far below its usual level or stops completely.
Product analysts, engineers who ship tracking changes and growth teams who depend on funnels can use it as a tripwire.
What you get out of it
Broken tracking is found in hours
An hourly comparison finds a missing event the same day it breaks, so the gap in your data is hours long, not weeks, and can often be backfilled or explained.
Releases are checked for side effects
After each deployment, a drop in a key event is an early sign that a change broke something. Teams can roll back or fix before many users hit the issue.
Decisions rest on complete data
A funnel with a missing step looks like a sudden conversion crash. Catching the cause stops people from reacting to a drop that is actually a tracking bug. Weeks of wrong numbers lead to wrong decisions.
Consent and privacy changes are noticed
A new cookie banner or SDK setting can reduce events overnight. The alert shows the effect quickly, so you can judge whether it is expected. Then the team can decide whether the change is acceptable.
Engineers hear about it first
Posting in Slack puts the alert where developers work. They can answer in the thread, which makes the fix visible to the people waiting on the data. Fixes are quicker when everyone sees the same message.
How it works
What happens, step by step
Every hour, ClickRuntime counts the Purchase events Amplitude received in the last hour.
It compares that with the usual count for that hour.
If the count is zero or far below normal, a message goes to your Slack channel with the hour, the count and what is usual.
Before it runs live
- Connect Amplitude
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Amplitude steps into one automation
Under the hood
The code that runs this automation
import json
from datetime import date, datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify
def amp(path, **params):
auth = (credentials.secret("AMPLITUDE_API_KEY"), credentials.secret("AMPLITUDE_SECRET_KEY"))
resp = http.get(f"https://amplitude.com/api/2/{path}", auth=auth, params=params)
resp.raise_for_status()
return resp.json()["data"]
@on_trigger
def run(event):
now = datetime.now(timezone.utc)
start = (now - timedelta(days=7)).strftime("%Y%m%dT%H")
data = amp("events/segmentation", e=json.dumps({"event_type": "Purchase"}),
start=start, end=now.strftime("%Y%m%dT%H"), i=-3600000, m="totals")
hours = dict(zip(data["xValues"], data["series"][0]))
last_hour = (now - timedelta(hours=1)).strftime("%Y-%m-%dT%H:00:00")
count = hours.get(last_hour, 0)
usual = [v for k, v in hours.items() if k[11:13] == last_hour[11:13] and k != last_hour]
avg = sum(usual) / len(usual) if usual else 0
if count == 0 or count < avg / 2:
notify.slack(f"Purchase events low: {count} in the hour from {last_hour[11:16]} UTC (usual {avg:.0f}).",
channel="#product")
return {"count": count, "usual": round(avg, 1)}FAQ
Common questions
How does it decide what is a drop?
Will a quiet night cause a false alarm?
Can I watch several events at once?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post yesterday's Amplitude users to Slack
Your team starts each day with active and new user counts in the channel.
See how it worksGet a weekly email of new users by source
Each Monday you see which UTM sources brought new users, compared with the week before.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Find out when a key Amplitude event stops firing” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.