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
| Name | Required | Meaning |
|---|---|---|
| from | Yes | Start day, YYYY-MM-DD. Up to 400 days. |
| to | Yes | End day, YYYY-MM-DD, inclusive. |
| compare_from | No | Explicit baseline start day, with compare_to. |
| compare_to | No | Explicit baseline end day. |
| vs_prior_days | No | Baseline of N days before from (1 to 400). Not with compare_from/compare_to. |
| route_pattern | No | Limit 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