I would love to see weekcount, monthcount, and yearcount added to the Statistics module (in node_counter table) in addition the the current totalcount and daycount.

weekcount, monthcount, and yearcount are arguably more significant statistics for a large site than daycount, and this added functionality seems quite reasonable for a dedicate statistics module (and would not take very much effort to add).

Why not rely on third-party contrib modules like Statistics Granularity or Statistics Counter for this functionality? Because any kind of third-party implementation like that which extends the node_counter table requires an extra trip to the db for every single page request, which is extremely redundant, and a significant performance hit, since the node_counter table can easily grow huge.

The only other option to avoid this kind of redundancy is to create a contrib module designed to completely replace the statistics module, but this itself becomes extremely redundant and counter productive when we already have a statistics module in core.

Comments

b_sharpe’s picture

Version: 7.x-dev » 9.3.x-dev

This still is a thing and would like to see in most recent versions

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Active » Postponed

Statistics is approved for removal. See #3266457: [Policy] Deprecate Statistics module in D10 and move to contrib in D11

This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

It will be moved to a contributed Statistics project once the project is created and the Drupal 11 branch is open.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.