Skip to content
next-story
Menu

GET /sites/:site_id/compare

Compare periods

Route-by-route deltas between a window and a baseline window.

Compares a day window with a baseline: by default the same number of days immediately before it, or an explicit window, or a given number of prior days. The baseline used is echoed back, so the agent never has to guess.

Routes present in only one window are kept, because a route that vanished is exactly the kind of regression this endpoint exists to surface.

Query parameters

NameRequiredMeaning
fromYesStart day, YYYY-MM-DD. Up to 400 days.
toYesEnd day, YYYY-MM-DD, inclusive.
compare_fromNoExplicit baseline start day, with compare_to.
compare_toNoExplicit baseline end day.
vs_prior_daysNoBaseline of N days before from (1 to 400). Not with compare_from/compare_to.
route_patternNoLimit to one route pattern.

Returns

route_pattern
Row key
current, baseline
Counts and rates for each window
delta
rage_rate, dead_click_rate, conversion_rate, session_count
baseline_window
The baseline actually used
outcome_mix
Bounce, engaged and converted shares for both windows