Skip to content

Commit

Permalink
Moves anonymous opt-in telemetry function from CLI to WP plugin (#1721)
Browse files Browse the repository at this point in the history
* 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 <blake.wilson@wpengine.com>
Co-authored-by: John Parris <john.parris@wpengine.com>

* 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 <john.parris@wpengine.com>

* 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 <blake.wilson@wpengine.com>

---------

Co-authored-by: Blake Wilson <blake.wilson@wpengine.com>
Co-authored-by: Theofanis Despoudis <328805+theodesp@users.noreply.github.com>
Co-authored-by: Matthew Wright <1815200+matthewguywright@users.noreply.github.com>
Co-authored-by: Teresa Gobble <teresagobble@gmail.com>
  • Loading branch information
5 people committed Jan 11, 2024
1 parent f1e7058 commit c163fa5
Show file tree
Hide file tree
Showing 25 changed files with 964 additions and 735 deletions.
5 changes: 5 additions & 0 deletions .changeset/famous-steaks-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@faustwp/wordpress-plugin': minor
---

Added support for anonymous opt-in telemetry. Previously this functionality was in the Faust CLI package, but has been moved to the WordPress plugin instead. All telemetry collection is optional and anonymous, and it is disabled by default. If you were previously opted in from Faust CLI, once you update the Faust CLI packages your site will no longer send telemetry data unless you opt in again from the WordPress plugin.
5 changes: 5 additions & 0 deletions .changeset/polite-snails-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@faustwp/cli': patch
---

Adds block_editor_utils and experimental_app_router to telemetry events.
5 changes: 5 additions & 0 deletions .changeset/thick-pugs-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@faustwp/cli': major
---

**BREAKING**: Removed telemetry CLI commands for `faust telemetry enable/disable/status` for managing and viewing telemetry opt-in status. Telemetry functionality has been moved to the Faust WordPress plugin. Sites that previously opted in from CLI will no longer send telemetry data unless someone opts in from the WordPress side.
Loading

0 comments on commit c163fa5

Please sign in to comment.