Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves anonymous opt-in telemetry function from CLI to WP plugin (#1721)
* Create process telemetry rest route (#1684) * Create tests * [Merl-1281] Add extra Google Analytics variables to Faust (#1689) * Feat: Add block_editor_utils and app-router versions in telemetry events. * Chore: Added changeset * MERL-1343/MERL-1342: API rewrite to WP plugin vs GA (#1687) * Removed telemetry from the CLI and moved it into the Faust WordPress plugin. --------- Co-authored-by: Blake Wilson <[email protected]> Co-authored-by: John Parris <[email protected]> * MERL-1339: add WP notice for anonymous telemetry opt-in (#1690) * Added checkbox for 'Enable Faust Telemetry' * Added telemetry prompt to user page options * Add `enable_telemetry` and `telemetry_reminder` to `sanitize_faustwp_settings()` * Load telemetry callbacks file * test: confirm `show_telemetry_prompt()` is hooked to `admin_notices` * Sanitize telemetry reminder settings value by ensuring it's an integer * Test telemetry prompt behavior * test: confirm behavior of `should_show_telemetry_prompt()` * fix: adjust CSS button styles to not style buttons in the telemetry prompt * chore: adjust button classes and add aria-label attributes * Register, enqueue, and localize telemetry script * Register telemetry decision REST route * test: confirm telemetry script is registered * UX: Toggle checkbox on settings page to match user's decision. Since this happens over REST via JS and we don't reload the page, this provides a better UX. * test: confirm `should_show_telemetry_prompt()` returns false when telemetry disabled * chore: add changeset --------- Co-authored-by: John Parris <[email protected]> * Generate UUID v4 for telemetry ID (#1693) * chore: change test namespace from Unit to Integration * chore: fix test class name to match file name * fix: return 204 if telemetry not enabled * test: confirm behavior of `generate_telemetry_client_id()` * Support `telemetry_client_id` in settings sanitization function * test: confirm generated and saved id matches retrieved id. --------- Co-authored-by: Blake Wilson <[email protected]> --------- Co-authored-by: Blake Wilson <[email protected]> Co-authored-by: Theofanis Despoudis <[email protected]> Co-authored-by: Matthew Wright <[email protected]> Co-authored-by: Teresa Gobble <[email protected]>
- Loading branch information