Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MERL-1343/MERL-1342: API rewrite to WP plugin vs GA #1687

Merged
merged 25 commits into from
Dec 20, 2023

Conversation

matthewguywright
Copy link
Contributor

Description

Updated endpoint and refactored to post call to API endpoint for WP plugin vs previous GA4 endpoint.

Testing

Ensure CLI pings new endpoint for /wp-json/faustwp/v1/process_telemetry instead of ga4.

@matthewguywright matthewguywright requested a review from a team as a code owner December 18, 2023 15:38
Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: b002366

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/cli Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matthewguywright matthewguywright changed the base branch from feature/mw-cli-api-v2 to telemetry-updates December 18, 2023 15:44
@matthewguywright matthewguywright changed the title MERL-1343: API rewrite to WP plugin vs GA MERL-1343/MERL-1342: API rewrite to WP plugin vs GA Dec 18, 2023
@matthewguywright matthewguywright requested review from blakewilson, mindctrl and a team December 19, 2023 16:07
@blakewilson
Copy link
Contributor

blakewilson commented Dec 19, 2023

@matthewguywright It looks like there's build errors.

Copy link
Contributor

@blakewilson blakewilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works as expected 👍 @matthewguywright

@matthewguywright matthewguywright merged commit bb2d45f into telemetry-updates Dec 20, 2023
16 of 18 checks passed
@matthewguywright matthewguywright deleted the feature/mw-merl-1343 branch December 20, 2023 21:25
mindctrl added a commit that referenced this pull request Jan 11, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants