Don't Log Bots [](https://github.com/YOURLS/awesome-yourls/)
April 21, 2022 ยท View on GitHub
Plugin for YOURLS 1.6+.
Description
Ignore bot hits in your stats (both click count as seen in the main admin page and in detailed stats).
Installation
- In
/user/plugins, create a new folder nameddont-log-bots. - Drop these files in that directory.
- Go to the Plugins administration page ( eg
http://sho.rt/admin/plugins.php) and activate the plugin. - Have fun!
License
YOURLS' license, aka "Do whatever the hell you want with it". YOURLS - MIT License
More
The list of bot user agent strings has been compiled from one of my own YOURLS setup: user-agents looking like bots with more than 100 hits. There is no reliable way to determine if a client is a bot or not.
To check user agents on your own setup, you can try this query:
SELECT DISTINCT `user_agent` as ua, COUNT(*) as c FROM `yourls_log` GROUP BY ua ORDER BY c DESC