A first-order Markov chain over page types is the model most next-action work should start with. It takes ten lines to fit, you can read every parameter, and its failures are informative about what a bigger model would need to do.
From sessions to transitions
The input is sessions, produced by the boundary rule described in session reconstruction, and that rule is a modelling choice rather than a preprocessing detail: a longer timeout stitches a return visit onto the previous session and creates transitions that no single sitting contained.
The second choice is the state alphabet. Modelling transitions between individual URLs on a site with 400,000 pages gives 1.6 × 1011 possible transitions and essentially no data per cell. Modelling transitions between page types — home, search, product, cart, checkout, exit — gives a matrix you can read and estimate reliably. Start coarse. If the coarse model predicts well, a finer alphabet may add resolution; if it predicts badly, a finer one will only add noise.
Take five sessions over the alphabet H (home), S (search), P (product), C (cart), X (exit).








