Forecast organic traffic
forecast_trafficProjects future Search Console clicks (or impressions) for a property using the app's forecasting model: multiplicative seasonal decomposition (ratio-to-moving-average) plus an auto-selected trendline (linear / polynomial / log / exponential / power by best R-squared), re-seasonalised for each future period. Optionally applies a manual growth rate and derives revenue from a conversion rate and average order value. History needs: weekly needs 13 complete weeks and monthly 6 complete months, after the first and last (possibly partial) period are dropped, so about 105 days (weekly) or 240 days (monthly) of data. Days and periods without rows count as zero. A constant history (for example all zero) gets a flat forecast with forecastNote. Reads the ClickHouse warehouse when available, else the live Search Console API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aov | No | Optional average order value (in currency units) used with cvr for revenue. | |
| cvr | No | Optional conversion rate as a decimal (0.025 = 2.5%) to derive forecast revenue. | |
| metric | No | Metric to forecast (treated as "sessions" by the model). | clicks |
| siteUrl | Yes | ||
| currency | No | Currency label for the revenue fields (display only). | USD |
| growthRate | No | Optional manual growth rate per period as a decimal (0.05 = +5%). Default 0. | |
| granularity | No | Forecast granularity. Weekly needs about 105 days of history (13 complete weeks), monthly about 240 days (6 complete months). | weekly |
| historyDays | No | Trailing days of history to fit on (default 480 ≈ 16 months; more improves seasonality). | |
| trendlineType | No | Force a trendline model, or "auto" for the best R-squared (default). | auto |
| compoundGrowth | No | Compound the growth rate across periods (default true). | |
| forecastPeriods | No | How many future periods (weeks or months) to project. Default 26. | |
| additionalSessions | No | Optional flat sessions added to every forecast period. Default 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| metric | No | ||
| siteUrl | No | ||
| currency | No | ||
| forecast | No | ||
| trendline | No | ||
| dataSource | No | ||
| granularity | No | ||
| dataMaturity | No | ||
| forecastNote | No | ||
| historyRange | No | ||
| settledThrough | No | ||
| seasonalIndices | No | ||
| historicalPeriods | No | ||
| candidateTrendlines | No | ||
| warehouseLatestDate | No |