Staff Software Engineer · React, Next.js, React Native · Building Masareef, Rafiq & Nafis
Staff Software Engineer, 6+ years. I build React, Next.js, React Native and TypeScript apps for fintech and Arabic users, including Masareef, Rafiq and Nafis. Originals live at mohamedgado.com/writing.
Markdown supported · ⌘↵ to post
Hafiz Waleed Ahmed
The useful part is treating the user agent as the source of truth, not screen size or navigator.webdriver. Meta's crawlers render like a normal desktop Chrome, so a filter that only drops HeadlessChrome or webdriver=true will keep counting them as people. Matching the crawler token before the analytics beacon, and reusing that same pattern on older queries, keeps live traffic and dashboards aligned. It is also worth testing the regex against real device names so a loose "bot" match does not drop phones such as Cubot.