Understanding visitor analytics and tracking
🆔 Visitor ID: Loading...
📄 Page:
🔗 Came from:
🌍 Your IP: Being tracked on backend
Drast is a comprehensive visitor tracking system that captures detailed information about who visits your website. When someone visits a page with the tracking script installed, we collect:
Country, state, city, coordinates, and timezone information derived from IP address using ipapi.is.
Device type (desktop, tablet, mobile), browser name and version, operating system - all parsed from user agent.
ISP information, company type (hosting, business, ISP), ASN data, and autonomous system details.
VPN detection, proxy detection, datacenter IP identification, crawler/bot detection, and Tor exit node detection.
Page URL, page path, referrer (previous page), screen resolution, language preference, and visit timestamp.
All data is processed in real-time with ~250ms response time from geolocation API and immediate logging.
The tracking system consists of three main components:
A lightweight JavaScript tracker (drast-tracker.js) that runs on the visitor's browser. It collects browser-side data like URL, referrer, screen size, and user agent, then sends it to the API.
A Next.js API endpoint (/api/tracking/pageview) that receives the data, extracts the visitor's IP from request headers, enriches it with geolocation and network data, and logs everything to the console.
Integration with ipapi.is for IP geolocation and ua-parser-js for user agent parsing to extract device, browser, and OS information.
This is a test/demo system. In production, visitor tracking should: