-
Notifications
You must be signed in to change notification settings - Fork 295
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
Integrate First-Party Mode Toggle into Analytics Settings Form #9654
Comments
Hey @hussain-t, this comment applies to these AC too: #9655 (comment). Update: see also #9655 (comment). |
Thanks, @techanvil. I've removed specifying the component name, back to you. |
Thanks @hussain-t! AC ✅ |
@hussain-t I've picked this up for IB as I'm back in squad M next week. Working through this however, I found an issue with rolling back the settings if the user cancels changes in the settings form. Because FPM uses a fetch store instead of a settings store, it doesn't implement rollback and we don't know if the user changed the setting or not. What do you think about switching the FPM store for the isEnabled setting to be a settings store rather than a fetch store? Do you see issues with this?
|
Hi @benbowler, the reset and rollback changes are being implemented in #9688. Let me know if that helps. Thanks! Update: It should work similarly to the conversion tracking settings. |
@benbowler, we should call the |
IB ✅ |
…toggle-analytics Enhancement/#9654 - Integrate First-Party Mode Toggle into Analytics Settings
QA Update: ✅Verified:
|
Feature Description
Add the
<FirstPartyModeToggle />
component to the Analytics settings forms, enabling existing users to opt into First-party mode. The toggle will default to "off" and can be enabled if desired.If either the FPFE health check or script access check fails, the toggle will be disabled and grayed out, displaying an error message instructing users that additional server configuration is needed to enable First-Party Mode.
For details, refer to the Design Doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/modules/analytics-4/components/settings/SettingsForm.js
, import and render the newFirstPartyModeToggle
if thefirstPartyMode
feature flag is enabled.assets/js/modules/analytics-4/datastore/settings.js
:saveSettings
function, check if the first party mode settings has changed using thehaveFirstPartyModeSettingsChanged
selector, if so dispatchsaveFirstPartyModeSettings
, returning an error if there is one, similar to how the conversion tracking setting is saved:site-kit-wp/assets/js/modules/analytics-4/datastore/settings.js
Lines 182 to 192 in 44e0928
rollbackChanges
function, within thehaveSettingsChanged
check block, dispatch the actionresetFirstPartyModeSettings
.site-kit-wp/assets/js/modules/analytics-4/datastore/settings.js
Line 242 in 44e0928
Test Coverage
assets/js/modules/analytics-4/datastore/settings.test.js
to confirm the first-party mode setting is saved and rolled back.QA Brief
firstPartyMode
feature flag enabled and ensure that the Analytics module is active and connected.Site Kit > Settings > Analytics
and click the Edit link. Verify that the First-party mode toggle is displayed.Save
toConfirm changes
.Note: If your test site fails either of the health checks, you can force local settings to test the toggle functionality using the following action in the console:
Changelog entry
The text was updated successfully, but these errors were encountered: