Hello,
here a method to block visits via IP with a ASN name blacklist and with a IP to ISP or IP to ASN mmdb database.
This methode block visits complete, also not only the tracking.
The PHP Script returns a HTTP-Status Code 451 - Unavailable For Legal Reasons (Copyright, etc.)