Kama Click Counter
Here I’m presenting you the plugin that counts the number of clicks on the specified link and displays a block of file downloads on which clicks are counted. It is a more convenient alternative to the once widely used «Downloads Manager».
Kama Click Counter is a WordPress plugin which counts the number of file downloads. Also, it's able to count clicks on all links.
Kama Click Counter is tightly associated with the WordPress media library. If the file specified for the count is in the WordPress media library, then the link is bound to this file. In case you change the name or description of the file from the plugin, they also change the file in the library and vice versa.
When you delete the file from the media library, the link is also removed from the table of links in the plugin but not vice versa. You can see the binding in the "Attach" field on the statistics page:
It doesn't matter how the file should be uploaded. The plugin just needs a URL to start counting clicks.
For convenience, you can find the button on the visual editor (TinyMCE). Copy the link to the uploaded file and use the buttons to insert "download" block into the post:
As a result, the shortcode will be added to the post content, and later it will be replaced by respective HTML code. The "Download" block template can be changed in the settings:
html class links
The plugin is able to count clicks on all types of links. To activate the count, you need to add
class="count" attribute to the link. The class name can be changed on the plugin's Settings page.
The number of clicks for ordinary links
With activation of this option, you can display the statistics of clicks per link in "title" attribute or "text after the link". By default, the number of clicks does not appear in order to minimize the number of queries (requests) to the database.
Distinguish links from different positions
If the box is checked (by default) the plugin will count the same links from different posts separately. In other words, it will separate link count for every post. In case you do not need this option, uncheck this box, and clicks on the same links but in different posts will be stored in one place.
Whether to add jQuery
Without a checkmark. The plugin will count links to the class count only in the content of the article. If this option is set, a little jQuery code snippet will be added to the website and you will be able to specify the "count" class for any link on the website and all clicks on them will be counted. There is no sense to turn off this option, it does not load anything, and you can turn it off only if you do not use jQuery on the website and you do not want to load it just for the sake of this option.
Once the link is recorded to the database, its data, such as file size, name, description, number of clicks, can be changed. To do it click on the "Edit" link on the stats page and you will be redirected to such a page:
When you remove the plugin, it automatically deletes all its data: the table in the database and the options.
Actually, I agree that it is terrible to be without an internet connection, but it's not always the case. My granny was right when she told me that every cloud has its silver lining.
Another breakdown at the telephone exchange which periodically disturbs my already unstable nervous system led me to some thoughts. The sequence of chaotic and useless thoughts ended exactly at the moment when I decided to improve my "Kama Click Counter" plugin which counts clicks on links.
The first version of the plugin has been created in March 2011 and I immediately noticed that my life became a bit easier because I deleted the "Downloads Manager".
The second version was born in those "internet free" days.