• Home
  • About 404TS
  • Contact
  • Shop

404 Tech Support

Where IT Help is Found

  • Articles
    • Code
    • Entertainment
    • Going Green
    • Hardware, Gadgets, and Products
    • Management
    • Network
    • News
    • Operating Systems
    • Security and Privacy
    • Software
    • System Administration
    • Talking Points
    • Tech Solutions
    • Web
    • Webmaster
  • Reviews
  • Media
    • Infographics
    • Videos
  • Tech Events
  • Tools
    • How do I find my IP address?
    • Browser and plugin tests
  • Get a Technical Consultation
You are here: Home / Articles / Webmaster / Resetting Webpage Stats in Joomla Mod_Stats

Resetting Webpage Stats in Joomla Mod_Stats

2011-06-29

I’m pretty spread out across different CMS’s these days: Joomla, Drupal, and obviously WordPress. I’m hoping to remove Joomla by migrating sites to Drupal or WordPress. Today, I received a request to reset the default stat counter for a Joomla-powered site. The hit counter that comes with Joomla is mod_stats and includes mod_stats.php and helper.php. The front-end of mod_stats allows you to tweak some settings of the hit counter but doesn’t allow you to zero it out in case you want to track by the year. My normal approach would be to implement a better tool like Google Analytics but since I’m hopefully changing the site soon, I looked into just resetting the counter.

By running through the code with mod_stats, I figured out its query and was able to reset the counter. I was expecting a simple value in the database keeping track of the traffic. Instead, there is an attribute in the Content table called ‘hits’. It keeps track of the visitors to each page. The stat counter then sums all of those values together from each article and outputs it wherever you have the Stats module set.

Using phpMyAdmin which comes with most shared hosting these days, I was able to find the table and use an SQL query to zero out the hits value of all articles.

[sql]UPDATE `[JoomlaTablePrefix]_content`
SET `hits` = 0[/sql]

Change the [JoomlaTablePrefix] to whatever your database table prefix is, obviously. If you don’t know the database username and password needed to get into database, you can look in your site’s configuration.php and find the information there.

After I zeroed the hits on all of the articles, it took a little while for the stats to show up again. As soon as it registered a new visitor though, it showed up again where it was placed in the theme. Hopefully I’ll be away from Joomla this time next year but in case I’m not, I now have it documented how to “easily” reset mod_stats to zero.

Share this:

  • Facebook
  • Twitter
  • Reddit
  • Google
  • Print

Related

Filed Under: Webmaster

Trending

  • GoTenna allows for direct connections between smartphones
    In Hardware, Gadgets, and Products
  • Apple Talks Mac OS X Lion, iOS 5, and iCloud at WWDC Keynote
    In Hardware, Gadgets, and Products, Network, News, Software
  • ThreatExpert
    In Media, Security and Privacy

Latest Media Posts

Multifunctional Video Conversion Tools – Wondershare Video Converter

Multifunctional Video Conversion Tools – Wondershare Video Converter

The WannaCry Post-Mortem

The WannaCry Post-Mortem

  • Popular
  • Latest
  • Today Week Month All
  • Microsoft Word: “This modification is not allowed because the selection is locked.” Microsoft Word: "This modification is not allowed because the selection is locked."
  • How to edit the message subject in Outlook 2016 How to edit the message subject in Outlook 2016
  • What is the AllJoyn Router Service on Windows 10? What is the AllJoyn Router Service on Windows 10?
  • Increase IIS Private Memory Limit to improve WSUS availability Increase IIS Private Memory Limit to improve WSUS availability
  • Scan-To-Email with Office 365 from a multifunction copier or printer Scan-To-Email with Office 365 from a multifunction copier or printer
  • You Can Use A VPN To Unlock Regional Content on the Amazon Fire Stick You Can Use A VPN To Unlock Regional Content on the Amazon Fire Stick
  • 3 Common Online Scams People Still Fall For In 2018 3 Common Online Scams People Still Fall For In 2018
  • Methods of Network Transition from IPv4 to IPv6 Methods of Network Transition from IPv4 to IPv6
  • Deleted Partition Recovery – Using Disk Drill File Recovery Tool for Windows Deleted Partition Recovery – Using Disk Drill File Recovery Tool for Windows
  • Securing Open Source Components (it’s different)                                   Securing Open Source Components (it’s different)                                  
Ajax spinner

Upcoming Tech Events

  1. Red Hat Summit 2018

    May 8 - May 10

View All Events

Elevator Pitch

404 Tech Support documents solutions to IT problems, shares worthwhile software and websites, and reviews hardware, consumer electronics, and technology-related books.

Subscribe to 404TS articles by email.

Follow Us

  • Facebook
  • Google+
  • RSS
  • Twitter
  • YouTube

Recent Posts

  • You Can Use A VPN To Unlock Regional Content on the Amazon Fire Stick
  • 3 Common Online Scams People Still Fall For In 2018
  • Methods of Network Transition from IPv4 to IPv6

Search

FTC Disclaimer

404TechSupport is an Amazon.com affiliate; when you click on an Amazon link from 404TS, the site gets a cut of the proceeds from whatever you buy. This site also uses Skimlinks for smart monetization of other affiliate links.
Use of this site requires displaying and viewing ads as they are presented.

Copyright © 2018 · 404TechSupport.com