Guess.js is a collection of libraries and tools for enabling machine learning-driven user experiences on the web through predictive data analytics.
The project solves the problem of improving perceived page load performance and user engagement by predicting which pages or content a user is likely to visit next. It works by analyzing Google Analytics data to identify navigation patterns, then uses this intelligence to prefetch or prerender resources before the user requests them. The approach operates at multiple levels: at the page level by prefetching the most likely next page, at the bundle level by prefetching JavaScript chunks associated with probable next pages based on connection type, and at the content level by adjusting the user experience based on predicted interests.
For adoption, the tool is most suitable for webpack-based applications seeking to implement predictive prefetching, though it also supports non-webpack sites through a static site workflow. The webpack plugin automates much of the setup by consuming data from Google Analytics and the parser module to configure predictive fetching. Developers can also use individual packages independently: the GA module for fetching analytics data, the parser module for JavaScript framework route parsing, or the webpack plugin for complete integration. The project explicitly targets improving performance and user happiness through data-driven bundling and loading strategies.
The project maintains active development with ongoing refinement of its core capabilities. The codebase is organized as a monorepo with separate packages for distinct concerns, allowing modular adoption. Documentation includes both quickstart guides for webpack users and workflows for static sites, indicating attention to different developer needs. The tool remains in alpha status, suggesting it continues to evolve based on real-world usage patterns.