Detect synthetic clicks on a webpage

前端 未结 6 1460
谎友^
谎友^ 2021-01-15 19:51

Through Javascript is it possible to detect synthetic clicks (the clicks that were not generated by human but instead was generated using JS or some other automation tool) ?

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-15 20:23

    There is no reliable way to do this just by examining the page events.

    You can certainly tell if an event was triggered by code or a "mouse click", however there is no way to know for certain if an actual human clicked the mouse, which I believe is what you're asking.

    You could probably watch for mouse movements and analyze them to see if they contain enough artifacts of human muscle movement (non-linear movement), but if this works at all, I wouldn't expect it to last very long until the ad-fraud people catch on and add some randomization.

    This is why Google and others have resorted to CAPTCHAs and other Turing-type tests.

提交回复
热议问题