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

Add survey for GA4 dashboard view #6574

Closed
nfmohit opened this issue Feb 10, 2023 · 7 comments
Closed

Add survey for GA4 dashboard view #6574

nfmohit opened this issue Feb 10, 2023 · 7 comments
Labels
Exp: SP P0 High priority Type: Enhancement Improvement of an existing feature

Comments

@nfmohit
Copy link
Collaborator

nfmohit commented Feb 10, 2023

Feature Description

Users using the GA4 dashboard view on their sites should be offered a survey to track the usage of the new GA4 dashboard view, and receive valuable insights and feedback accordingly.

The survey trigger infrastructure is being enhanced in #6306.

The trigger ID for this survey can be view_ga4_dashboard and it should show up on sites using the GA4 dashboard view.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A survey with the ID 'view_ga4_dashboard' should be triggered on the main Site Kit Dashboard when GA4 is connected and isGA4DashboardView() returns true.

Implementation Brief

(It is probably useful to wait until #6306 is in Approval before writing an IB for this issue, as it would depend on the implementation of #6306.)

Test Coverage

  • No new tests are needed, update any failing tests.

QA Brief

  • Set up a new site, connect the plugin and enable the ga4reporting feature flag.
  • Go to the site-kit dashboard page and ensure that you see a request to the /wp-json/google-site-kit/v1/core/user/data/survey-trigger?_locale=user endpoint that has {"data":{"triggerID":"view_ga4_dashboard"}} in payload.

Changelog entry

  • Add trigger for a survey to track the usage of the new GA4 dashboard view.
@nfmohit nfmohit added the Type: Enhancement Improvement of an existing feature label Feb 10, 2023
@mxbclang mxbclang added the P0 High priority label Feb 27, 2023
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Mar 7, 2023
@kuasha420 kuasha420 removed their assignment Mar 18, 2023
@eugene-manuilov eugene-manuilov self-assigned this Mar 20, 2023
@eugene-manuilov
Copy link
Collaborator

In assets/js/components/DashboardMainApp.js:

  • Check whether ga4reporting is enabled using useFeature hook.
  • Find out whether the current dashboard is GA4 dashboard using isGA4DashboardView selector from ANALYTICS module.

@kuasha420, I am not sure if it is the right place to trigger that survey. How about we add the SurveyViewTrigger component to the DashboardAllTrafficWidgetGA4 component? In this case, we will not pollute the global component with module specific logic and we won't need to check anything because if that widget is rendered, then both ga4reporting and isGA4DashboardView are true.

@kuasha420
Copy link
Contributor

@eugene-manuilov that's brilliant, I have updated the IB accordingly. Cheers.

@eugene-manuilov
Copy link
Collaborator

IB ✔️

@wpdarren
Copy link
Collaborator

QA Update: ⚠️

@eugene-manuilov just to check. The QAB says:

... endpoint that has {"data":{"triggerID":"view_ga4_dashboard"}} in payload.

I see a request to the /wp-json/google-site-kit/v1/core/user/data/survey-trigger?_locale=user with an endpoint {data: {triggerID: "view_ga4_dashboard"}} The data and triggerID do not have " " characters around them.

Is that expected?

image

@eugene-manuilov
Copy link
Collaborator

@wpdarren, yes, that's okay. Those quotes are omitted for keys in preview.

@eugene-manuilov eugene-manuilov removed their assignment Mar 21, 2023
@wpdarren
Copy link
Collaborator

QA Update: ✅

Verified:

A request to the /wp-json/google-site-kit/v1/core/user/data/survey-trigger?_locale=user endpoint has {"data":{"triggerID":"view_ga4_dashboard"}} in payload when on the dashboard.

image

@wpdarren wpdarren removed their assignment Mar 22, 2023
@aaemnnosttv
Copy link
Collaborator

⚠️ Approval

This is resulting in a duplicate trigger request being made. It doesn't impact the release so we can address this detail in a follow-up issue, but the rest is working as expected. I'll open a new issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exp: SP P0 High priority Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

8 participants