Ignore events from Google and Yandex bots
Signed-off-by: William Brawner <me@wbrawner.com>
This commit is contained in:
parent
c22c7ef971
commit
378cc8c432
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
console.log('Flayre respects DNT');
|
||||
return;
|
||||
}
|
||||
if (window.navigator.userAgent.indexOf('Googlebot') !== -1
|
||||
|| window.navigator.userAgent.indexOf('YandexBot') !== -1) {
|
||||
console.log('Ignoring events for bots');
|
||||
return;
|
||||
}
|
||||
const flayreDomain = document.currentScript.src.split('/').slice(0, 3).join('/');
|
||||
const app = document.currentScript.dataset.app;
|
||||
|
||||
|
|
Loading…
Reference in a new issue