Skip to main content
Web clickstream data is bursty and sessionized: visits cluster into sessions, sessions convert at some rate, and traffic ebbs and flows with time of day and day of week. ClickstreamGenerator reproduces these session and conversion dynamics for web-analytics modeling.
The model Human sessions per time bin are Poisson-distributed around base_sessions, modulated by hour-of-day and day-of-week seasonality and a slow log-random-walk trend. Bot traffic — a flatter profile with occasional crawl spikes — is added on top when include_bots is set. Pageviews (a geometric page depth for engaged sessions), bounces, and conversions are derived from the human sessions, with multipliers set by traffic_source. output_type chooses which of the four series to return. The seasonality assumes hourly data: with freq='h' the day/night and weekday patterns are correct, and other frequencies distort them.

Session counts (1 week hourly)

Generate hourly session data for 3 series with mixed traffic sources, bot detection, and conversion tracking.

Traffic source comparison

Compare conversion rates across different traffic sources: organic, paid, direct, and referral.

Complete metrics

Generate a full set of web analytics metrics including sessions, pageviews, conversions, bounces, and derived rates.

Conversion funnel

Simulate a conversion funnel with 10,000 sessions to see drop-off rates at each stage.

Hour-of-day pattern

Analyze the average session count by hour of day over 4 weeks to reveal the daily traffic pattern.

Model information

Inspect the generator’s configuration and parameters.
Related generators Full parameters are in the generator reference.