Skip to content

colab

GSC Anomaly Detection

Three models for finding the traffic anomaly you didn't know to look for. Point any of them at a Search Console export.

Three notebooks, three models, because they catch different kinds of weird. Each one takes a Search Console CSV (date, clicks, impressions, CTR, position) and tells you which days stopped behaving.

Which one you want depends on what you’re chasing.

Isolation Forest is the fast first-pass sniff test. It’s good at multi-dimensional weirdness, clicks and impressions and CTR and position all considered together. It’s bad at gradual change and anything seasonal, so a slow bleed will walk right past it.

Local Outlier Factor finds the pages that are odd within their own group, which makes it the one for keyword-level data and A/B comparisons. But it has no global awareness, so a dataset with wildly disparate performance will confuse it.

Forecast residual uses STL decomposition, so it handles real seasonality including holidays, and it catches the gradual shifts the other two miss. It wants a decent date range to work with, and it can be persnickety to tune.

A flagged day is a question, not an answer. The model has no idea you shipped a migration that week, or that GSC was just late reporting.

Everything runs in your own Colab session, so nothing leaves the notebook except the files you download. (Still worth a look at your own client agreements and security policy before you upload anything. Not a call I can make for you.)

Source on GitHub