Marketing permissions per 100 users, across 11 sites.
eligible_users
=
all_users
−
email_unsubscribers
The sum of permissions across five channels: email, SMS, wallet pass, web push, and app. Each one is an explicit consent from a user to be reached on that channel — no null-state shortcuts.
A user counts once per channel they granted, so someone reachable on three channels contributes 3 to the numerator.
Only email and SMS are instrumented today; wallet pass, web push, and app are part of the definition but not yet populated in the data.
The pool of users who are reachable in principle — i.e. haven't actively unsubscribed. Breaks down as:
eligible_users
=
all_users
−
email_unsubscribers
Unsubscribers (email_consented = FALSE with a non-null updated_at) are removed so opted-out churn doesn't drag the rate down.
The raw fraction is small (single-digit per 100), so we report rate × 100. Computed with SAFE_DIVIDE, which returns NULL rather than erroring when a site has no eligible users yet.
email on file.email_consented = TRUE — explicit consent.phone on file.sms_consented = TRUE — explicit consent required (TCPA).email_consented = FALSEemail_consented_updated_at IS NOT NULL — actively flipped off.eligible_users can be inflated by bot traffic.-- Cumulative exchange rate for a single site. -- Scope: every user ever created. Counted as of now. -- Numerator spans 5 channels. wallet_pass / web_push / app are part of -- the definition but not yet instrumented — they evaluate to 0 for now. WITH base AS ( SELECT COUNTIF(email IS NOT NULL AND email_consented = TRUE) AS email_permissions, COUNTIF(phone IS NOT NULL AND sms_consented = TRUE) AS sms_permissions, COUNTIF(wallet_pass_active = TRUE) AS wallet_pass_permissions, -- pending COUNTIF(web_push_subscribed = TRUE) AS web_push_permissions, -- pending COUNTIF(app_push_consented = TRUE) AS app_permissions, -- pending COUNTIF(email_consented = FALSE AND email_consented_updated_at IS NOT NULL) AS email_unsubscribers, COUNT(*) AS all_users FROM `user` WHERE website_id = 'NaVnjma' -- Final Boss Sour ) SELECT all_users, email_unsubscribers, all_users - email_unsubscribers AS eligible_users, email_permissions, sms_permissions, wallet_pass_permissions, web_push_permissions, app_permissions, email_permissions + sms_permissions + wallet_pass_permissions + web_push_permissions + app_permissions AS total_permissions, SAFE_DIVIDE( email_permissions + sms_permissions + wallet_pass_permissions + web_push_permissions + app_permissions, all_users - email_unsubscribers ) * 100 AS permissions_per_100_users FROM base;
-- Daily cohort exchange rate for a single site, last 14 days. -- Scope: users whose created_at falls on day D. Permissions counted as of now. -- Recent days under-state the rate (cohorts haven't matured). -- wallet_pass / web_push / app are defined but not yet instrumented. WITH cohort AS ( SELECT DATE(created_at) AS cohort_date, COUNT(*) AS all_users, COUNTIF(email_consented = FALSE AND email_consented_updated_at IS NOT NULL) AS email_unsubscribers, COUNTIF(email IS NOT NULL AND email_consented = TRUE) AS email_permissions, COUNTIF(phone IS NOT NULL AND sms_consented = TRUE) AS sms_permissions, COUNTIF(wallet_pass_active = TRUE) AS wallet_pass_permissions, -- pending COUNTIF(web_push_subscribed = TRUE) AS web_push_permissions, -- pending COUNTIF(app_push_consented = TRUE) AS app_permissions -- pending FROM `user` WHERE website_id = 'NaVnjma' AND created_at >= CURRENT_DATE() - INTERVAL 14 DAY GROUP BY cohort_date ) SELECT cohort_date, all_users, email_unsubscribers, all_users - email_unsubscribers AS eligible_users, email_permissions, sms_permissions, wallet_pass_permissions, web_push_permissions, app_permissions, SAFE_DIVIDE( email_permissions + sms_permissions + wallet_pass_permissions + web_push_permissions + app_permissions, all_users - email_unsubscribers ) * 100 AS permissions_per_100_users FROM cohort ORDER BY cohort_date DESC;