-
Notifications
You must be signed in to change notification settings - Fork 293
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
Automatically switch sites to the GA4 dashboard view on October 1 #6549
Comments
Have moved this back to AC to determine whether to develop this behind a feature flag instead of trying to target a specific release. |
Thank you, @techanvil! I have updated the ACs to mention the addition of the Banner Notification developed in #6558 to Other than that, @aaemnnosttv @tofumatt do you folks have any thoughts regarding @techanvil's idea of using some sort of a flag (e.g. a new feature flag) to develop/test this ahead of time, and fine-control the activation date instead of relying on people updating their Site Kit version? (Slack discussion) Thanks! |
Thanks @nfmohit. To be honest, I'd have thought the existing feature flag system would be the most pragmatic choice here, but I'm not sure what if any alternative we currently have in terms of infrastructure that lets us update some data remotely... |
@techanvil I agree that some kind of controllable flag would be best here rather than making this release-dependent. Certainly a feature flag could be used for this condition, but I don't think there are that many moving pieces here that would justify it, particularly on the server side, nor do we need the the gradual rollout. We could implement the flag "internally" and essentially calculate it rather than sourcing it as a persistent remote flag as we usually do, which isn't something we've done before but is something we could potentially consider. How about using a dismissed item instead (e.g. One more thing I wanted to highlight from the current AC is that it seems to be inconsistent with the description which says that we only want to do the automatic transition if GA4 is connected. This nuance isn't represented in the current first point:
Also, this selector is currently part of the |
Thank you for spotting this, @aaemnnosttv! I have updated this. |
Hmm. Well, if we're going to be determining the value ourselves, does it need to be a persisted value at all? Also, seeing as the intention here is to toggle some behaviour after September 30, 2023, if we're not going to do this remotely or via a release, why don't we simply treat this as another date-dependent piece of functionality? |
@techanvil not necessarily, but it could be useful to have it leverage existing infra.
Given that the changes only seem to be relevant for the front end it could be date-based using the current reference date. The only problem with that is that we don't currently have an easy way to control this for QA ahead of time. On its face, there's many ways this could be done, but I think aiming for something which is straightforward to QA would be a good guiding principal. Conceptually, I feel like this fits well with dismissed items since the UA dashboard is kind of being "dismissed" permanently. The mechanism for setting the dismissal could be triggered by conditions using the reference date, and for QA we could use a console command to trigger that dismissal. If we wanted to go for a bit cleaner of an approach, we could use a feature flag but have the enabled state of that featured flag controlled by a dismissed item. That way it could still be toggled via the tester plugin but would be controlled by the plugin itself. That's my 2c. Thoughts @felixarntz ? |
Hi @aaemnnosttv, thanks for the detailed explanation. I've certainly no objection to the direction you've suggested here, and am interested to hear @felixarntz' thoughts too. One alternative possibility I would like to suggest though, a suggestion that could keep the front-end code a bit simpler, while also allowing ease of QA, would be to implement this as a simple check against the reference date, and then to facilitate QAing, we could add a feature to the helper plugin that allows the reference date to be overridden so it's set at page load time. That would allow simple QAing of this as well as other reference-date related features... |
@techanvil that sounds reasonable to me and something I had considered at some point as well. The one issue that might be a problem there is the availability of that value which is currently only exposed through the data store. We'd need to introduce a mechanism for providing this on page load as well as make that addition in the tester plugin but that would be fine. I think this much is worth doing anyways as we'll have some date-based logic in here regardless. Would you please open a new issue for this part? Then the AC would only need the added detail here about when the change should take effect, and this issue would depend on the new one. |
Note: Have moved this back to the EB, as the additional point added to the AC is no longer needed and has been removed (see the description edit history for the date of this comment). This is no longer needed due to the updated AC for #6914. |
QA Update
|
QA Update ✅
Note : I've noticed that Dashboard sharing functionality for Analytics is not working correctly when site swicthes to GA4 dashboard view. I will create a separate ticket for that and will update here. |
Note : As mentioned above created new issue for Dashboard sharing - View only dashboard related issue > #7417 |
Feature Description
Note: This is a time-sensitive issue. This shall only be executed to be released as a part of the Site Kit update/release going right after UA has a zero-data state.The changes outlined here will be date-based, i.e. developed as we go, but will be visible to users on or after October 1 2023.Around 90 days after the UA cut-off, Site Kit will no longer show any UA data anymore naturally. At this point, for the sites that have GA4 connected, we want to switch them automatically to the GA4 dashboard view. To accomplish this, we will need to make a few small changes like the following:
isGA4DashboardView
selector (being implemented in AddisGA4DashboardView
selector #6541) should be updated so that if GA4 is connected, it should unconditionally returntrue
. Since Site Kit will automatically switch to the GA4 dashboard view at this point, this selector returning true will not require us to change the logic immediately and give us a generous amount of time to remove the selector and the UA module overall.Since we will automatically switch sites to GA4 dashboard view, we will no longer need to prompt users to switch over. Hence, the “Switch to GA4 Dashboard View”This will be done as a part of Remove UA counterparts after SK no longer shows UA data beginning September 25 #6786.BannerNotification
(being added in Add the “Switch to GA4 Dashboard View” notification banner #6544) should be removed, along with theshouldPromptGA4DashboardView
selector in theanalytics-4
datastore.Since at this point there will be no way to switch back to the UA dashboard view, the dashboard view toggle in Analytics settings (being added in AddThis will be done as a part of Remove UA counterparts after SK no longer shows UA data beginning September 25 #6786.dashboardView
toggle in Analytics settings #6547) should be removed.Here is the relevant part in the design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
ga4Reporting
feature flag is enabled:isGA4DashboardView
selector in theanalytics
datastore should be modified to always returntrue
if GA4 is connected.<BannerNotifications />
).ModuleRecoveryAlert
banner. It should appear aboveZeroDataStateNotifications
.Dashboard view
setting in Analytics module settings (Site Kit -> Settings) (both view and edit) should not be displayed.getReferenceDate()
selector in thecore/user
store. It is being enhanced as a part of Provide reference date to client on page load #6782 so that an optional custom reference date can be set on page load for testing purposes.Implementation Brief
assets/js/modules/analytics/datastore/settings.js
:isGA4DashboardView()
selector so that it also returnstrue
if the following conditions are met:ga4Reporting
feature flag is enabled.getReferenceDate()
selector in thecore/user
store) is October 1 2023 or later.isModuleConnected( 'analytics-4' )
selector in thecore/modules
store).assets/js/modules/analytics/components/common/UACutoffWarning.js
:getReferenceDate()
selector in thecore/user
store) is October 1 2023 or later:<SettingsNotice />
component'snotice
prop according to the Analytics widget area notices in this screen.No fresh data to display. Universal Analytics stopped collecting data on July 1. To resume collecting Analytics data, set up Google Analytics 4.
.Learn more
link andSet up Google Analytics 4
CTA should persist as of today./assets/js/components/notifications/SwitchedToGA4Banner.js
(being added in Add the "Switched to GA4" notification banner #6558):BannerNotification
such that besides the existing conditions, it is also checked if the current date (obtainable viagetReferenceDate()
selector in thecore/user
store) is October 1 2023 or later.assets/js/components/notifications/BannerNotifications.js
:/assets/js/components/notifications/SwitchedToGA4Banner.js
component (being added in Add the "Switched to GA4" notification banner #6558).<ModuleRecoveryAlert />
component, only if thega4Reporting
feature flag is enabled.assets/js/modules/analytics/components/settings/SettingsForm.js
:Dashboard view
setting fields group is displayed so that besides the current conditions, it is also checked if the current date (obtainable viagetReferenceDate()
selector in thecore/user
store) is October 1 2023 or later - the group should not be displayed if so.assets/js/modules/analytics/components/settings/SettingsView.js
:Dashboard view
setting meta view is displayed so that besides the current conditions, it is also checked if the current date (obtainable viagetReferenceDate()
selector in thecore/user
store) is October 1 2023 or later - the meta view should not be displayed if so.Storybook
UACutOffWarning
to display its updated copy after UA-removal (October 1).SettingsEdit
&SettingsView
showing its difference of state after UA cut-off (July 1) and UA-removal (October 1).Test Coverage
assets/js/modules/analytics/datastore/settings.test.js
:isGA4DashboardView()
selector to reflect the above changes.assets/js/modules/analytics/components/common/UACutoffWarning.test.js
:QA Brief
ga4Reporting
feature flag enabled and connect Analytics (both GA4 & UA).googlesitekit.api.set('modules', 'analytics', 'settings', { dashboardView: 'universal-analytics' })
2023-10-01
or later. Alternatively use the following snippet to set the date via the JS console while using the plugin.googlesitekit.data.dispatch('core/user').setReferenceDate('2023-10-01')
true
, as well as by viewing the Dashboard and checking that the GA4 versions of the widgets are displayed.googlesitekit.data.select('modules/analytics').isGA4DashboardView()
googlesitekit_analytics-4_settings
option from the DB.2023-10-01
or later, in order to override the Dashboard View to GA4.Changelog entry
The text was updated successfully, but these errors were encountered: