feat: filter headless browsers and zero-screen bots client-side
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// * Skip headless browsers and automated tools (Puppeteer, Playwright, Selenium)
|
||||
if (navigator.webdriver) {
|
||||
return;
|
||||
}
|
||||
|
||||
// * Get domain from script tag
|
||||
const script = document.currentScript || document.querySelector('script[data-domain]');
|
||||
if (!script || !script.getAttribute('data-domain')) {
|
||||
@@ -321,6 +326,11 @@
|
||||
height: window.innerHeight || window.screen.height,
|
||||
};
|
||||
|
||||
// * Skip bots with no screen dimensions (0x0)
|
||||
if (screenSize.width === 0 && screenSize.height === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const payload = {
|
||||
domain: domain,
|
||||
path: path,
|
||||
|
||||
Reference in New Issue
Block a user