discourse/app/models/concerns
Martin Brennan 14b436923c
FEATURE: Switch to new methods of pageview measurement and reporting (#28729)
### UI changes

All of the UI changes described are gated behind the `use_legacy_pageviews`
site setting.

This commit changes the admin dashboard pageviews report to
use the "Consolidated Pageviews with Browser Detection" report
introduced in 2f2da72747 with
the following changes:

* The report name is changed to "Site traffic"
* The pageview count on the dashboard is counting only using the new method
* The old "Consolidated Pageviews" report is renamed as "Consolidated Legacy Pageviews"
* By default "known crawlers" and "other" sources of pageviews are hidden on the report

When `use_legacy_pageviews` is `true`, we do not show or allow running
the "Site traffic" report for admins. When `use_legacy_pageviews` is `false`,
we do not show or allow running the following legacy reports:

* consolidated_page_views
* consolidated_page_views_browser_detection
* page_view_anon_reqs
* page_view_logged_in_reqs

### Historical data changes

Also part of this change is that, since we introduced our new "Consolidated
Pageviews with Browser Detection" report, some admins are confused at either:

* The lack of data before a certain date , which didn’t exist before
  we started collecting it
* Comparing this and the current "Consolidated Pageviews" report data,
  which rolls up "Other Pageviews" into "Anonymous Browser" and so it
  appears inaccurate

All pageview data in the new report before the date where the _first_
anon or logged in browser pageview was recorded is now hidden.
2024-09-10 09:51:49 +10:00
..
reports FEATURE: Switch to new methods of pageview measurement and reporting (#28729) 2024-09-10 09:51:49 +10:00
anon_cache_invalidator.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
cached_counting.rb DEV: In test, if flush is called and there is no thread, flush inline (#21426) 2023-05-08 13:25:00 +10:00
category_hashtag.rb DEV: Remove enable_experimental_hashtag_autocomplete logic (#22820) 2023-08-08 11:18:55 +10:00
custom_field.rb DEV: Add true_fields method for CustomFields (#24876) 2023-12-14 11:06:21 -06:00
has_custom_fields.rb FIX: do not use return in block (#26260) 2024-03-20 10:49:28 +01:00
has_deprecated_columns.rb DEV: Remove version-number-based logic (#25482) 2024-01-30 17:34:10 +00:00
has_destroyed_web_hook.rb FEATURE: granular webhooks (#23070) 2023-10-09 03:35:31 +00:00
has_sanitizable_fields.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
has_search_data.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
has_url.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
limited_edit.rb FIX: Always trust admin and moderators with post edits (#25602) 2024-02-08 13:10:26 +10:00
positionable.rb FIX: Update position on model when re-positioning record (#24997) 2023-12-21 10:15:10 +08:00
roleable.rb DEV: Make more group-based settings client: false (#25585) 2024-02-08 09:43:34 +10:00
searchable.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
second_factor_manager.rb DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
stats_cacheable.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
topic_tracking_state_publishable.rb DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
trashable.rb DEV: Added .only_deleted scope in the Trashable module (#20196) 2023-02-07 15:28:59 -03:00