google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 291 forks source link

Add feature tour for GA4 metrics #6554

Closed nfmohit closed 1 year ago

nfmohit commented 1 year ago

Feature Description

A new feature tour will be created as per the Figma designs, that will navigate the user throughout the new GA4 components. This feature tour should be triggered as soon as the user has switched to the GA4 dashboard view, i.e. isGA4DashboardView selector (being added in #6541) returns true. This should be built behind the ga4Reporting feature flag.

Since the feature tour will be persistently dismissed upon completion and dismissal, it will not show up again.

Here is the relevant section in the design doc.

Here is a screenshot for visual aid: image


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

tofumatt commented 1 year ago

For posterity, here's a link to our Slack discussion for potential solutions to implement this given the isInViewSelect issues posed here: https://10up.slack.com/archives/CBKKQEBR9/p1678975545428009

eugene-manuilov commented 1 year ago

@tofumatt, could you please review IB?

tofumatt commented 1 year ago

Most of this seems good, and I think technically the approach will work okay, but compared to what we discussed on Slack it seems this IB is a trade-off… it's much easier to understand/implement, but it might possibly cause the feature tour to activate before resolvers have finished loading, which could mean DOM elements aren't yet rendered. This would mean React Joyride will reference DOM elements that don't exist and it could cause issues.

Though actually, I realised we could call the triggerOnDemandTour( 'ga4Reporting' ) in a component (like SearchFunnelWidgetGA4/Overview/index.js) only once the component isn't in a loading state.

That would make this really slick and less fragile, since as soon as the components we care about render their contents we can trigger the tour.

Can you update the IB so that triggerOnDemandTour( 'ga4Reporting' ) is only called once any components we need to be in a non-loading state are fully-rendered?

I think then this is good-to-go, and it's better than my suggestion in Slack of waiting on resolvers themselves. Nice 👍🏻

eugene-manuilov commented 1 year ago

Can you update the IB so that triggerOnDemandTour( 'ga4Reporting' ) is only called once any components we need to be in a non-loading state are fully-rendered?

Thanks, @tofumatt. IB is updated.

tofumatt commented 1 year ago

This is awesome 👍🏻

IB ✅

eugene-manuilov commented 1 year ago

@marrrmarrr could you please confirm that feature tour steps shown in the Figma design are correct? I am asking because on the Figma design we have Sessions and Engaged Sessions, but in the plugin we have Sessions and Engagement Rate. Also, some steps have "Learn more" links, which URLs should we use?

marrrmarrr commented 1 year ago

Hey @eugene-manuilov, confirming this metric should be "Engagement rate", as is currently in the plugin. I think the Figma designs might have gone slightly out of date, since they were completed before we had a few discussions with Tom on updating some metrics' naming.

In terms of the Learn More links:

eugene-manuilov commented 1 year ago

Thanks, @marrrmarrr. Can you give me the correct title and description for each step since text on the Figma design is outdated?

aaemnnosttv commented 1 year ago

@eugene-manuilov would you please add a QAB?

mohitwp commented 1 year ago

QA Update ⚠️

Tested on develop. @nfmohit GA4 dashboard feature tour is not getting trigger for me. I followed the below steps. Tested by creating new site and also tested using oi.ie with dev plugin.

@wpdarren Can you pleasLet me know if you are able to trigger feature tour for GA4.

Steps-

wpdarren commented 1 year ago

@mohitwp I was able to get this to work earlier this morning when writing up the bug bash instructions. Is your site in gathering state?

image

mohitwp commented 1 year ago

@wpdarren I also tested using oi.ie site. But it is not triggered for me.

eugene-manuilov commented 1 year ago

Steps-

  • Created new InstaWP site.
  • 'ga4Reporting' Feature flag - DISABLED.
  • Set up Site Kit with Analytics.
  • 'ga4Reporting' Feature flag - ENABLED.
  • Go to Site kit Dashboard.
  • Site kit dashboard not automatically switching to GA4 when we enable 'ga4Reporting' feature flag.
  • Enable GA4 view for Site kit dashboard from Settings.
  • Go to Site kit Dashboard.
  • No feature tour trigger for GA4 dashboard.

@mohitwp you need to clear your browser session storage because we have a delay (stored in the session storage) that prevents showing feature tours too often.

image

mohitwp commented 1 year ago

QA Update ✅

Note :

![image](https://user-images.githubusercontent.com/94359491/231962858-e67a40f4-4d6a-4f32-b1fc-4c057558cfca.png) ![image](https://user-images.githubusercontent.com/94359491/231962930-1b201f96-2df0-4489-a6b2-bb883b7c223b.png) ![image](https://user-images.githubusercontent.com/94359491/231963012-ab44a80e-aaa0-466c-8efb-474712e5575b.png)