At a glance: Localytics Metrics

Here are a few common Localytics metrics to keep handy when you are constructing queries:

Metric SQL metric Table
Sessions COUNT(*) fact_sessions
Devices COUNT(distinct localytics_device_id) fact_sessions, fact_events
Sessions / User COUNT(*) / COUNT(distinct localytics_device_id) fact_sessions
Customers COUNT(distinct customer_id) fact_sessions, fact_events
New users COUNT(distinct localytics_device_id)…WHERE device_is_new = ‘true’ fact_sessions
Avg Session Length AVG(session_length) fact_session_closes
Median Session Length MEDIAN(session_length) fact_session_closes
Occurrences COUNT(*) fact_events
Occurrences per User COUNT(*) / COUNT(distinct localytics_device_id) fact_events
Sessions by event COUNT(distinct session_uuid) fact_events
Total revenue SUM(ltv_change) fact_events
Paid Users COUNT(distinct session_uuid)…WHERE nullif(ltv_change,0) is not null fact_events
Transactions COUNT(*)…WHERE nullif(ltv_change,0) is not null fact_events
Avg revenue per user SUM(ltv_change) / COUNT(DISTINCT localytics_device_id) fact_events