Add support for AJAX count via statistics.php

Created on 10 September 2024, 5 months ago

Problem/Motivation

This is similar to #2403155: Add support for AJAX node view count but for Drupal 8+.

The core statistics module triggers an AJAX request to /core/modules/statistics/statistics.php and this small PHP script increments the count.
This allows counting to work even when using a caching reverse-proxy like Varnish.

Steps to reproduce

  1. Use Varnish to cache generated HTML pages.
  2. Visit a cached page multiple times.
  3. daycount is incremented but not weekcount.

Proposed resolution

I am not sure which hooks or events are triggered by statistics.php.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇫🇷France prudloff Lille

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

Comments & Activities

Production build 0.71.5 2024