Event contract
Fields the query expects
| Field | Type | Why it exists |
|---|---|---|
| timestamp_utc | Timestamp | Event time. |
| user_id | Utf8 | Stable user identifier. |
| event_name | Utf8 | signup_completed or first_meaningful_action_completed. |
| acquisition_source | Utf8 | First-touch or agreed attribution source. |
Copy the query
WITH users AS (
SELECT
user_id,
MIN(acquisition_source) AS acquisition_source,
MAX(CASE WHEN event_name = 'signup_completed' THEN 1 ELSE 0 END) AS signed_up,
MAX(CASE WHEN event_name = 'first_meaningful_action_completed' THEN 1 ELSE 0 END) AS activated
FROM product_events
WHERE timestamp_utc >= now() - INTERVAL '30 days'
GROUP BY user_id
)
SELECT
acquisition_source,
SUM(signed_up) AS signups,
SUM(activated) AS activated_users,
100.0 * SUM(activated) / NULLIF(SUM(signed_up), 0) AS activation_rate_pct
FROM users
WHERE signed_up = 1
GROUP BY acquisition_source
HAVING SUM(signed_up) >= 20
ORDER BY activation_rate_pct DESC;This recipe is read-only and reviewed against Telemetry's DataFusion query patterns. Sample output is deterministic and synthetic; validate field types, thresholds, and business definitions against your own data.
Query result
Activation rate by acquisition source
Documentation sends fewer signups than organic search but the highest activation rate.
| acquisition_source | signups | activated_users | activation_rate_pct |
|---|---|---|---|
| documentation | 420 | 218 | 51.9 |
| organic_search | 980 | 392 | 40 |
| paid_social | 610 | 128 | 20.98 |
Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.
How the SQL works
- 1The user CTE turns repeated milestone events into one row per user.
- 2The same agreed attribution field is carried into both the numerator and denominator.
- 3The minimum-signup rule prevents small sources from dominating a ranked percentage.
Edge cases to decide
- MIN(acquisition_source) is only safe if the source is stable per user; otherwise create a dedicated attribution event.
- Activation needs a time window long enough for the product’s normal onboarding cycle.
- Compare qualified segments and cost before declaring one channel better.
Recommended dashboard
- Bars: activation rate by source
- Table: signups, activated users, and cost
- Trend: source conversion by signup cohort
Alert guidance
Review sustained source conversion changes; do not page on normal acquisition variation.
Read alert setupPut the recipe to work
Related instrumentation and guides
Continue the analysis
Build a Signup-to-Activation Funnel in SQL
Calculate unique-user conversion through signup, onboarding, integration, and first-value milestones.
Open recipeCalculate Weekly Cohort Retention
Group users by first activity week and measure the percentage returning in later weeks.
Open recipeFind Features Used Before Upgrade
Join feature events to upgrade events and rank behaviors that occur before paid conversion.
Open recipeRun it on real events
Create a table, adapt the fields, and save the result
Start free, send structured events, and use the query result as a chart, shared dashboard widget, or alert input.