Docs Sales By Country for WooCommerce Country Anomaly Alerts

Country Anomaly Alerts

Country Anomaly Alerts highlight countries whose sales have moved away from their own recent pattern — a sudden spike, an unexpected drop, a market that has gone quiet, or one appearing for the first time.

This feature needs no API key and no AI provider. The detection is a statistical calculation that runs entirely on your own server — no data leaves your site at any point.

How detection works

Each country is compared against its own recent history rather than against other countries. The plugin splits the selected period into windows, builds a baseline from the previous six, and measures how far the current window sits from that baseline.

This matters because it makes the alerts meaningful for small markets too. A country doing a steady handful of orders a week gets flagged when its own pattern breaks — it is not drowned out by your largest markets.

The four signals

SignalMeaning
SpikeSales well above the country’s recent trend.
DropSales well below the country’s recent trend.
EmergingFirst sales from this country in the period being examined.
SilentA country that was reliably ordering has stopped.

Severity bands

BandWhen it applies
HighThe move is at least 2.5 standard deviations from the country’s baseline.
MediumAt least 2.0 standard deviations from the baseline.
InfoNotable but below the statistical thresholds — for example a brand-new market.

Each alert also carries a short reason in plain language, such as “Sales down 43% vs its 6-period average”, so you can see what triggered it without reading the numbers yourself.

Countries with fewer than five orders in the current window are skipped. Without that floor, normal variation in very small markets would flag constantly.

Where alerts appear

Alerts are shown in a panel on the Analytics → Sales by Country report, above the chart, with a count of how many countries are flagged and how many are high severity. The panel hides itself completely when nothing is deviating, so it only appears when there is something to look at.

Detection follows the report filters, so the alerts always describe the date range and country type you are currently viewing.

Tuning the thresholds

Developers can adjust the sensitivity with the srbc_anomaly_thresholds filter — the two standard-deviation cut-offs, the minimum order count, the number of baseline windows, and how many active periods must pass before a silence counts.