Survey test response rate
1. Dataset Name
survey_test_response_rate
2. Description
(rephrased) A response-rate dataset that combines two event sources to calculate the share of candidates who submitted a survey out of those who were served one. Each row represents a single event — either a survey submission (from survey_analytics) or a survey delivery (from www_server_log). Combining these sources lets response rate be calculated in one pass, broken down by device and country.
3. Source Tables
- customer_views.survey_analytics (submit_survey events — numerator of response rate, filtered to event = 'submit_survey' and t_create >= '2021-03-14')
- customer_views.www_server_log (get_survey events — denominator of response rate, filtered to event = 'get_survey')
4. Grain
One row per vs_cookie per event type per session. The UNION ALL produces two distinct event types in a single table: 'submit_survey' rows (from survey_analytics) and 'get_survey' rows (from www_server_log). Response rate aggregations use COUNT DISTINCT on vs_cookie, partitioned by event value, to isolate numerator and denominator in a single pass.
5. Dashboards Supported
- Survey Analytics Dashboard
6. Metrics Supported
| Metric | Supported Breakdowns |
| Response Rate | No drilldowns |
| Response Rate Trend by Device | embedding_id, candidate_country |
| Response Rate by Country | embedding_id, interface |
7. Known Exclusions / Filters Applied
- The survey_analytics branch is filtered to event = 'submit_survey' and t_create >= '2021-03-14' at dataset build time — survey views, partial submissions, and pre-2021 submissions are excluded from the numerator.
- The www_server_log branch is filtered to event = 'get_survey' at dataset build time — only delivery events contribute to the denominator.
- embedding_id is present in the survey_analytics branch but NULLed out in the www_server_log branch (www_server_log does not carry embedding context). Drilldowns by embedding_id will therefore only reflect submission-side data.
- A single vs_cookie that submitted multiple surveys is counted only once in the numerator; a vs_cookie that was served multiple surveys is counted only once in the denominator. NULLIF prevents division by zero when no get_survey events exist for a given segment.
- embedding_id, interface, and candidate_country are available as additional outer select filters for dashboard-level cross-filtering.
- Monthly trend widgets use DATE_TRUNC('month', t_create) and are ordered ascending by month.
8. Schema
| Column Name | Data Type | Notes |
| vs_cookie | varchar | Unique visitor/session cookie identifier. Grain for both numerator (submit_survey) and denominator (get_survey) COUNT DISTINCT calculations. |
| t_create | datetime | Timestamp of the event. Primary date field for time-based filtering and monthly trend bucketing. Sourced from survey_analytics or www_server_log depending on the branch. |
| event | varchar | Event type. Two values in this dataset: 'submit_survey' (from survey_analytics) and 'get_survey' (from www_server_log). Used as the CASE partition to separate numerator from denominator. |
| interface | varchar | Device type (e.g. mobile, pc). Sourced from both branches. Used as a breakdown column in Response Rate Trend by Device. |
| candidate_country | varchar | Country of the survey participant or page visitor. Sourced from survey_analytics.country and www_server_log.country. Used as a breakdown column in Response Rate by Country. |
| embedding_id | varchar | Identifier of the survey widget embedding context. Populated only from the survey_analytics branch; NULL for www_server_log rows. |