मुख्य सामग्री पर जाएँ

एनालिटिक्स

वर्कबेंच: एक सवाल वाक्य की तरह लिखा जाता है और तीन तरीकों से पूछा जाता है, ट्रेंड, फ़नल या रिटेंशन। नतीजा वहीं बनता है, और रखने लायक हो तो डैशबोर्ड पर पिन हो जाता है।

The analytics workbench with a trend result
The workbench, a trend asked and drawn.
The analytics workbench with a trend result, dark theme
The workbench, a trend asked and drawn.

Six modes, one question

A trend counts one event over a range, as totals or unique people, at a granularity the range makes sensible. A funnel orders two or more steps and reports who made it through each. Retention asks who came back: an entry event, a return event and a matrix of periods. Paths asks what happened next, stickiness how many days a period's users came back on, and lifecycle who was new, returning, resurrecting or dormant in each period. Switching modes keeps everything the modes share, so a trend refined into a funnel does not start over.

Metrics and formulas

Two metrics and a formula drawn as a line chart
Metric B added, and a formula computed from A and B.
Two metrics and a formula drawn as a line chart, dark theme
Metric B added, and a formula computed from A and B.

A trend is not one measure: Add a metric appends a letter, B onward, each its own event and its own total or unique users measure, the scope event staying letter A. Add a formula turns a row into an expression combining those letters with decimal numbers and + - * /, grouped with parentheses, up to 200 characters and never another formula's own letter. A point the formula cannot compute, a division by zero among them, draws as a gap rather than a zero.

The compared period

A trend compared against the previous period, drawn as columns
This period's columns beside the period before.
A trend compared against the previous period, drawn as columns, dark theme
This period's columns beside the period before.

Compare asks the same question again over the window right before this one: Previous Period, Previous Day, Previous Week, Previous Month, Previous Quarter or Previous Year. Every series in the result gets a past twin, drawn apart from the current one rather than as a plain extra line, and the scope note names which one is picked. The compared period draws on Line, Stacked Line, Column, Stacked Column, Bar, Stacked Bar, Table and Metric; Pie draws the current period only.

Breakdowns

A trend broken down by two fields, read as a table
Two breakdowns, one row per combination.
A trend broken down by two fields, read as a table, dark theme
Two breakdowns, one row per combination.

Breakdowns split a trend by up to three fields at once, an event property or one of the columns the DSL allow-lists: every series in the result carries the tuple of values it is one combination of, in the breakdowns' own order. The table reads every combination as its own row; the other chart types read the first breakdown as the series and fold the rest into its key.

Paths: what happened next

A paths result as ranked columns, one per step
Three steps after an anchor, the top events ranked per step.
A paths result as ranked columns, one per step, dark theme
Three steps after an anchor, the top events ranked per step.

Paths start from an anchor event and walk one to five steps forward, or backward, within the anchor's session or a window of minutes or hours. Each step reports its top three, five or ten events with the share of that step's users, the events past the top folded into one row, and the users who took no further step. The default reading is one column per step; the same result reads as a sankey, with a block per event and a ribbon into each block of the next step, or as a tree that nests the next step's events under each event until its caret opens it.

Stickiness: how many days

A stickiness result as columns over days active
One period, its users by the number of days they were active.
A stickiness result as columns over days active, dark theme
One period, its users by the number of days they were active.

Stickiness counts, for each week or month, how many of the event's users were active on one, two, three and more of its days. The result row steps between periods; the column chart reads one period at a time, and the table reads all of them.

Lifecycle: new, returning, resurrecting, dormant

A lifecycle result as a stacked column with dormant below the zero line
Each period's users by lifecycle state, dormant hanging below the line.
A lifecycle result as a stacked column with dormant below the zero line, dark theme
Each period's users by lifecycle state, dormant hanging below the line.

Lifecycle sorts each period's users into four states: new were first seen in the period, returning were active in it and the period before, resurrecting came back after a period away, and dormant were active the period before and not in this one. First-seen reads the whole retained history, so a user is new once; activity is read one period before the range, so the first period's returning and dormant counts are real rather than zero by construction. The stacked column draws dormant below the zero line; the table adds a net column.

The sentence and its clauses

A property clause added to the sentence
A clause row, added mid-sentence.
A property clause added to the sentence, dark theme
A clause row, added mid-sentence.

The question reads as a sentence: measure, event, range and any clauses, each word an editable control with the project's own event names suggested as you type. Property clauses narrow by what an event carried; a cohort clause scopes the whole question to a saved cohort. Whether the question composes as one sentence or as labelled groups is a stored preference, as is the split or stacked layout; nothing runs until Run, so a half-edited question never fires.

Reading a result as another chart

The chart type menu open over a lifecycle result
Every type the result can be read as; the rest greyed, never hidden.
The chart type menu open over a lifecycle result, dark theme
Every type the result can be read as; the rest greyed, never hidden.

Every result row ends with the chart type it is read in. The menu lists Line, Stacked Line, Column, Stacked Column, Bar, Stacked Bar, Pie, Table, Metric, Funnel Steps, Retention Curve, Ranked Columns, Sankey and Tree, in that order, with the ones the result cannot take greyed rather than hidden. A trend, a stickiness period and a lifecycle take any of the series types; funnel steps take a funnel; the retention curve draws one line per cohort over its matrix; ranked columns, the sankey and the tree read paths; the table reads everything. Each mode remembers the type you chose, the URL carries it as ?chart=, and a pinned tile keeps it.

Results, and keeping them

A trend draws as a series, a funnel as its steps with the drop between them, retention as a matrix whose rows are entry periods, paths as ranked columns per step, stickiness as columns over days active and lifecycle as a stacked column. Once a result exists, Pin saves the question to a dashboard, where its tile re-runs the query on every open and draws it as the chart type it was pinned in.

Where this meets the API

The concept is the Analytics pillar. On the wire, the six modes are six queries: runQuery, runFunnel, runRetention, runPaths, runStickiness and runLifecycle, with event names suggested from eventCatalog (GraphQL reference). Pinning writes the question into a board through updateDashboard, with the report's kind and the chart type beside its query.