Event schema
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 read-only query is planned and executed against an empty typed table with Apache DataFusion 45.2.0. We review the synthetic sample output separately. Check field types, thresholds, and counting rules against your own data. Read the testing methodology.
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.
Reproduce the example
Download the sample data
The JSON bundle includes the event schema with field types, illustrative input rows, exact SQL, expected output, review notes, and engine version. The CSV contains the displayed result.
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 check
- 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 setupSet up the events this query needs
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 your 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.