Every Click Counts
Plugin for YOURLS
This plugin, aptly named "Every Click Counts", is for counting every click. That is, including multiple clicks for the same client. This is done by not caching the HTTP 301 redirects.
/user/plugins, create a new folder named
- Drop these files in that directory.
- Go to the Plugins administration page ( e.g.
http://sho.rt/admin/plugins.php) and activate the plugin.
- Have fun (with counts in large amounts)!
- Copyright (c) 2016 BestNa.me (http://BestNa.me)
- Licensed under the MIT license:
This plugin prevents the caching of HTTP 301 redirects as issued by YOURLS for every short URL. With such a redirect cached in a client browser, the client will not hit the server with the YOURLS installation on subsequent visits of the respective short URL (but rather jump directly to the corresponding long URL). Consequently, only a first client hit of a short URL can be counted by YOURLS. In other words, subsequent hits are not included in the clicks statistics.
Some people may want to track every click instead, that is, also track multiple clicks for the same client. If this is what you want: OK, this is exactly what the plugin was made for. If activated, HTTP 301 redirects are not cached anymore.
To flawlessly see your own multiple clicks as an admin counted, notice the following: if you had already used your YOURLS install before activating this plugin, you may first want to get rid of the redirects already cached in your browser. Depending on the particular browser you are using, this might be more or less elaborate, e.g. see this discussion on stackoverflow.com.