Problem/Motivation

Longstanding core module statistics is being deprecated and removed from core, following #3413917: Deprecate the Statistics module, #3340834: [meta] Tasks to deprecate Statistics and other related issues.

Because statistics is still used by many sites, 5% to 9% depending on which numbers you want to, that means at least 800k*5% = 40k sites, presumably smaller ones not using data-grabbing third-party SaaS, it needs at the very least to be preserved.

Because it has received comparatively little attention over the years, it also needs to be improved, and there are multiple directions for that.

Proposed resolution

  1. Create temporary project holding the core split until the core tasks reach the point where drupal.org/project/statistics can be created
  2. create drupal.org/project/statistics when approved: created and unpublished
  3. repatriate work from the temporary repo to that new official project
  4. migrate remaining core issues related to statistics on the 11.*, 10.* and 9.* branches, but not earlier ones, or those related to the core removal process, to the new project
  5. perform triage on core 7.* issues, moving those still relevant to the new project, and leaving others in place until final D7 EOL
  6. perform triage on issues, priorizing
    1. bugs on 11.x
    2. bugs on 10.*
    3. bugs on 9.* (no remaining issue on 8.x)
    4. non-bug issues
  7. define axes of development. Initial axes envisioned, in no particular order:
    • scope extensions
      • tracking of all (content) entity views canonical pages
      • tracking of other view types, possibly per view mode
      • non-entity tracking (e.g. landing pages)
    • collection extension
      • longitudinal statistics for sites with enough traffic
      • longitudinal statistics for smaller sites with traffic low enough that stats cannot be collected often enough for lack of incoming requests and no external cron
      • support for offline data collection/shipping to decouple statistics and their rendering from core storage
      • support for more granular collection, probably by roles only to avoid privacy issues for PII collection
      • consider whether DNT support is relevant, probably relating to the GDPR module: #3445764: Assert behavior regarding DNT
    • UI improvements. Currently, UI is limited to exposing the node_counter to Views
      • provide a default Views report
      • once longitudinal collection is implemented, provide Views integration
      • once that is done, provide a default Views report
      • support offline rendering, to decouple UI from core workload

Not applicable. See project at https://www.drupal.org/project/statistics

Remaining tasks

User interface changes

TBD, but at least a default Views page for current stats and later a default Views page for longitudinal stats.

API changes

None in 1.x. For 2.x, TBD, but probably a lot.

Data model changes

None in 1.x For 2.x, TBD, but probably a lot. A move to the extended K/V API is likely.

Release notes snippet

TBD.

Comments

fgm created an issue. See original summary.

fgm’s picture

Issue summary: View changes
kgaut’s picture

I'm seeing a 404 error on https://drupal.org/project/statistics. Is-it normal ?

longwave’s picture

@Kgaut the "statistics" project name is currently reserved, we have asked the drupal.org administrators if this restriction can be removed so it can be used for the module in contrib.

fgm’s picture

drumm’s picture

The proposed resolution is missing coordinating with the Drupal Association for packages.drupal.org adjustments, which needs to be done any time a module or theme moves into or out of core with the same name. Picking a different name for the contrib version would make this go a lot more smoothly for Composer.

If a new name can't be used, a new issue like #3308347: Ensure that ckeditor does not get special core treatment needs to be created, and updated when the module is ready to be installed on its own. There are still risks, see #3309838: Incorrect version of CKEditor being parsed from info.yml files and its related issues.

Reserving the name via project_issue module wasn't intended, but I'm glad it was, since these steps were being skipped. I'll look at getting every other core component's name reserved.

quietone’s picture

Just noting that Step 4 in this issue is covered by Step 5 in the Meta to remove statistics. #3341091: [11.x] [Meta] Tasks to remove Statistics

@drumm, I think you have identified a mistake in the documented process for removing an extension. Currently, the step to create an issue like #3308347: Ensure that ckeditor does not get special core treatment is in the set of steps to do for removal, not for deprecation.

quietone’s picture

Adding the deprecation issue because that can only be completed once there is a stable release of statistics in contrib.

andypost’s picture

quietone’s picture

drumm’s picture

If https://www.drupal.org/project/statistics is not set up in the next day or two, I should re-reserve it, so it isn't taken by another project.

If a different name could be used, then #3421792: Ensure that Statistics does not get special core treatment would not be needed and we avoid any unexpected Composer behavior.

fgm’s picture

@drumm : I am still not able to create the project node, see attached image.

error message saying statistics is already in use

drumm’s picture

The project name, “Statistics” also needs to be unique for autocomplete fields, like the Project field in the issue update form on this page. You could call it something like “Statistics from core.” I did go ahead and delete the conflicting project, since it was a sandbox with no code, that was a bit spammy. So the “Statistics” name is also free now.

andypost’s picture

quietone’s picture

@fgm, thanks for taking on maintainership of statistics in contrib. :-)

The next step for deprecating statistics in core is to have a stable release of the contrib project. @fgm, do you have time to do that?

If needed there are instructions at Create the contrib project with a stable release.

Thanks.

fgm’s picture

@quietone yes, that's my main goal for the DrupalCamp Rennes code sprint this week. I've set up a discussion with camp participants to have a variety of points of view to guide the plan.

fgm’s picture

After the discussion at DrupalCamp Rennes, the contrib plan is now at #3436823: Plan for Statistics 1.x.

frondeau’s picture

Hello the statistics team,
Will the new module set some more details as dates, referrers?
Where can I read the specifications?
Regards

fgm’s picture

@frondeau : please follow up on #3436823: Plan for Statistics 1.x. The future is now being written so you can be part of it. If you are attending DrupalCamp Rennes, join us in the second contribution room.

fgm’s picture

@quietone the current HEAD is now passing tests (except warnings on cspell), so it seems to be ready for 1.0.0, or at least 1.0.0-alpha1.

@vanessakovalsky and @hellosct1 also did a lot of triage on the remaining core issues at DrupalCamp Rennes.

quietone’s picture

@fgm, that is great news! There is one more thing needed before we can tag a core release with a deprecated statistics module and that is a stable release of the contrib module. Can you do that?

fgm’s picture

IMHO the module is ready to at least tag a 1.0.0-alpha1, but I'm a bit worried of tagging the 1.0.0 proper without third party review. Think I should do it nonetheless ? (and I fixed the cspell issues too) Build is broken by #3437434: Composer (next major) no longer works after 11.x updated to Symfony 7 but passed before that.

fgm’s picture

Issue summary: View changes
fgm’s picture

Issue summary: View changes
fgm’s picture

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Assigned: fgm » Unassigned
Status: Active » Fixed

This has been completed for some time. I am closing as fixed and have updated credit.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.