Hello,
after the installation of the module we noticed a problem related to the counting of the visit.
When you are not logged in to the site (anonymous user) and visit a page displayed on the frontend, the visit is not counted - registered on database.
Instead, when the visit is made by a logged user, such as administrator, the visit is counted correctly.
We have also seen that by deactivating the page cache (in settings.php file, by adding the following entry: $settings['cache']['bins']['page'] = 'cache.backend.null') the visit made by anonymous user is counted correctly.
Is it possible to keep the visit counting for anonymous users without deactivating the page cache?
Here are the configurations related to the server in use:
- Drupal version: 9.4.3
- Cache / CDN: none
Issue fork visitors-3307257
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
bluegeek9 commentedVisitors log the visit during hook_exit() so currently, there is no way to log cached (anonymous) views.
I looked at what the core statistics module does. It attaches javascript which makes an ajax request to drupal. This is how Matomo/Piwik, and Google Analytics work too.
This is the direction I want to take Visitors. Using javascript grants access to more data/metrics, e.g. screen resolution and browser features.
I have changed the issue to a feature request. There are a few smaller issues I want to resolve before starting on this.
Comment #3
claudioder86 commentedThanks for your support.
when will this new feature be available?
Comment #4
bluegeek9 commentedI will start it next for 7.x-1.x.
Before I can start, I need to wrap up #3087315: Filter/filter config anonymous users & paths for 8.x-2.x.
This feature also helps mitigate #1087268: Exclude robots from the statistics
Comment #5
bluegeek9 commentedComment #8
bluegeek9 commented