Many Joomla administrators know how to hide hit tracking on a Joomla article – they can do this simply by clicking on the article title in the Article Manager, and then clicking on Options button on the top right, and then setting the value of Show Hits to Hide. Setting this value will automatically hide the Number of Hits on any article’s page. But, it will not disable hit tracking, in other words, every time you load an article, the hits value of that article will be incremented by 1 (although it will not be displayed).
But what if, for one reason or another, you might want to disable hit tracking altogether (by the way, hit tracking can cause some load issues if your Joomla website has a lot of traffic and tens of thousands of articles)? Well, this can easily be done the following way:
- Download the file article.php located under the components/com_content/models folder.
-
Open the aforementioned file, and add the following line to the beginning of the hit function:
return true;
-
Upload the file article.php back to your Joomla website.
-
That’s it!
After doing the above, hit tracking will be completely disabled!
But, aren’t we changing a core file?
Yes, we are, and it is something that is not ideal, but this is the fastest solution. A better way to disable hit tracking is to open up the template file for the article page (e.g. templates/[your-template-name]/html/com_content/article/default.php) and add the following line:
<input type="hidden" value="0">
This solution will ensure that you’re not changing any core file, and, in our opinion, it’s a much better solution.
If you need help in completely disabling hit tracking on your Joomla website, then why not contact us? We can do it for you in no time and for a very reasonable fee!