Built an automated traffic monitoring system that pulls unique visitor data from AWStats across all 30 sites on the cPanel server. A root cron job runs daily at 4 AM, parsing AWStats data files from each site's home directory and generating a consolidated JSON report. The dashboard — embedded in the Product Hub header — shows yesterday's total visitors as the hero metric, with a 7-day rolling average, month-to-date unique visitors, and a sparkline trend line. An admin-only expandable view breaks down traffic by individual site with animated bar charts. Designed to track portfolio-wide growth as sites come online and gain traction. The whole pipeline is zero-dependency: PHP reads flat files, outputs static JSON, and vanilla JavaScript renders the widget.
Comments
No comments yet. Be the first to share your thoughts!
Comments
No comments yet. Be the first to share your thoughts!
Leave a Comment