Add a general counter API

Created on 17 December 2006, over 17 years ago
Updated 6 May 2024, about 1 month ago

Currently, node accesses are tallied in {node_counter} and all hits globalized in {accesslog}. However, modules building pages that are not nodes (like a dynamic graph) might want to have its access count tallied too.

Therefore a useful feature would be for statistics.module to include an API for modules to register hits so that they could be tallied and displayed later on just like node accesses.

Regarding storage, various scenarios come to mind, but the simplest seems to be adding a type column to node_counter in order to separately log actual nids for nodes, and virtual nids for module-generated pages. The URL-to-virtual-node mapping could be implemented by modules, or they could just pass the path to statistics.module so it would hash the path to a nid and back.

✨ Feature request
Status

Active

Version

1.0

Component
Statistics  →

Last updated 3 days ago

No maintainer
Created by

🇫🇷France fgm Paris, France

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024