-
Notifications
You must be signed in to change notification settings - Fork 130
Description
Feature Description
When activating Optimization Detective, it starts gathering URL metrics from visitors to the site. However, it has a storage locking mechanism to prevent a user (by hashed IP address) from submitting URL metrics more than once every 60 seconds. Additionally, URL metrics are not collected for administrator users since pages often include additional elements for admins which will make the URL metrics not applicable to non-admins. URL Metrics are now collected from admins as of #1788, and storage locking was disabled for administrators in #1835, allowing URL Metrics to be more rapidly collected as an admin browses the site.
If a site relies exclusively on user visits to populate a site with URL Metrics, then a site which does not get much traffic it can take a few days (or longer) to gather enough URL metrics to apply the optimizations. We could speed up this process by providing a way for an administrator to initiate a site-wide collection of URL metrics. A new query parameter could be introduced which (1) loads the page as a non-admin and (2) disables any storage locking for URL metrics. Then given a list of URLs on the site (e.g. from the sitemaps), each one could be loaded up in an iframe for each breakpoint. A progress bar could also be shown. The process could be interrupted at any time, and if the user wants to start again they could either initiate collection only for URLs for which there are no URL metrics gathered or else to start again from scratch.
Additionally, as discussed in #1850 (comment), there should also be a way to facilitate a Puppeteer script to automatically collect URL Metrics for a site on an ongoing basis using system cron (or in response to a post being updated).
Being able to turn off URL Metric collection from unauthenticated visitors in favor of an admin process or an automated system process could go a long way to making Optimization Detective feasible for higher traffic sites or sites that are at higher risk of scaling issues or bad actors attempting to submit bogus URL Metrics (e.g. which could erroneously report that the LCP element is in the footer, for example). See also: #1655.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status