{% extends "base.html" %} {% block title %}Factcat — Funnel{% endblock %} {% block extra_head %} {% endblock %} {% block extra_css %} .funnel-page { flex: 1; min-height: 0; overflow-y: auto; } .funnel-form { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem 3rem; } .funnel-form .summary { font-size: 0.8rem; color: var(--fc-slate); margin: 0 0 1rem; } .band-head { display: flex; align-items: center; gap: 0.5rem; } .band-title { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fc-ink-soft); } .band-head .linkish { margin-left: auto; } .catalog-status { font-weight: 400; color: var(--fc-slate); font-size: 0.7rem; margin: 0.2rem 0 0; } .catalog-status[hidden], #no-event-column[hidden] { display: none !important; } .steps { list-style: none; margin: 0.4rem 0 0.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; } .step { border: 1px solid var(--fc-line); background: var(--fc-snow); border-radius: 0.5rem; padding: 0.35rem 0.55rem; } .step-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; } .step-move { display: inline-flex; flex-direction: column; gap: 1px; } .step-move button { margin: 0; padding: 0; width: 1.1rem; height: 0.8rem; line-height: 0; background: none; color: var(--fc-slate); border: 0; cursor: pointer; } .step-move button:hover:not(:disabled) { color: var(--fc-ink); } .step-move button:disabled { opacity: 0.25; } .step-move svg { width: 0.75rem; height: 0.75rem; } .step-n { width: 1.3rem; height: 1.3rem; border-radius: 50%; flex: none; background: var(--fc-ink); color: var(--fc-snow); font-size: 0.7rem; display: grid; place-items: center; } .step .step-event { width: auto; min-width: 10rem; max-width: 18rem; margin: 0; border-radius: 0.4rem; font-size: 0.82rem; } .step .step-sql { flex: 1 1 16rem; margin: 0; border-radius: 0.35rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.78rem; } .step-event[hidden], .step-sql[hidden], .step-chips[hidden], .step .add-filter[hidden] { display: none !important; } .step-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; min-width: 0; max-width: 100%; } {% include "_filter_chips.css" %} .step-actions { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; } .step-actions .linkish { margin: 0; } #add-step { margin: 0.15rem 0 0; } #add-step[hidden] { display: none !important; } .funnel-toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 0.6rem 1rem; margin: 0.9rem 0 0.25rem; } .toolbar-field label { margin: 0 0 0.2rem; } .toolbar-field select { width: auto; min-width: 10rem; } .toolbar-cluster { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; } .toolbar-cluster[hidden] { display: none !important; } .toolbar-cluster label { display: inline; margin: 0; font-weight: 400; font-size: 0.8rem; } .toolbar-cluster input[type="number"] { width: 4.5rem; } .toolbar-cluster input[type="date"] { width: auto; } #window_days:disabled { color: var(--fc-slate); } #no-limit[aria-pressed="true"] { font-weight: 600; text-decoration: none; } #run-row { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0 auto; flex-wrap: wrap; } #run-row button { margin: 0; } #run-estimate { font-size: 0.8rem; color: var(--fc-slate); } #cap-override { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; } #cap-override[hidden] { display: none !important; } {% include "_estimate_chip.css" %} .tabs { display: flex; gap: 1rem; border-bottom: 1px solid var(--fc-line); margin: 0.75rem 0 0.6rem; } .tabs button { margin: 0; padding: 0.3rem 0 0.35rem; background: none; color: var(--fc-ink-soft); border: 0; border-bottom: 2px solid transparent; border-radius: 0; font-size: 0.8rem; cursor: pointer; } .tabs button[aria-selected="true"] { color: var(--fc-ink); font-weight: 600; border-bottom-color: var(--fc-ink); } .tab-panel[hidden] { display: none !important; } .chart-body { position: relative; display: flex; flex-direction: column; min-height: 22rem; } .chart-canvas { position: relative; height: 22rem; } .chart-canvas:has(> canvas[hidden]) { display: none; } {% include "_chart_empty.css" %} #chart-empty { min-height: 22rem; } #empty-copy { margin: 0; } #error { margin: 0.6rem 0 0; } .funnel-caption { font-size: 0.8rem; color: var(--fc-ink-soft); margin: 0.5rem 0 0; } .funnel-caption[hidden] { display: none !important; } #result-table { width: 100%; margin-top: 0; } #result-table th { font-size: 0.72rem; color: var(--fc-slate); } #result-table .r { text-align: right; padding-right: 0.5rem; } .empty { color: var(--fc-slate); font-size: 0.85rem; margin: 0; } .empty.fail { color: var(--fc-alert); white-space: pre-wrap; } #sql { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.78rem; } #sql.empty { color: var(--fc-slate); } {% endblock %} {% block body %}
{% set fc_entities = ((config.entity_label_plural or "Entities") if config.entity_label else "Entities") %}{% set fc_entities = fc_entities[:1]|upper ~ fc_entities[1:] %}

Funnel

{% if not mapping_ready %}

Map a table on Setup before Funnel can run.

{% endif %}

{{ config.table }} · {{ config.entity_label or "Entity" }} ({{ config.entity }}) · {{ config.event_time }}

{% include "_mapping_fields.html" %}
Steps, in order

No event-name column is mapped on Setup, so each step is a SQL condition.

    {% set range_label = "Date range" %}{% include "_report_range.html" %}
    days

    {% if mapping_ready %}Add a second step to run a funnel.{% else %}Map a table on Setup before Funnel can run.{% endif %}

    {% endblock %}