Plugin for YOURLS 1.6+
.
Ignore bot hits in your stats (both click count as seen in the main admin page and in detailed stats).
- 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!
YOURLS' license, aka "Do whatever the hell you want with it". YOURLS - MIT License
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