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
Prevent errors due to unique data stream name constraint #6727
Comments
I would like to include two bugs I have found while testing #6330 that I understand will be fixed in this ticket. A console error and analytics is not successfully set up in a specific scenario: I have a site that has Site Kit and Analytics already set up with a web data steam. I reset and set up again. Rather than go with the defaulted web data stream, I select from the dropdown to create a new one. When clicking on the configure analytics CTA, I am redirected back to the dashboard and the success notification appears. In the console though an error message appears on clicking the CTA.
When I go to the settings for Analytics, the module isn't connected and when editing the settings the GA4 property and web data stream fields are blank. You can see it in action on this screencast. web-1.mp4A similar issue occurs when I go to edit settings. I select a new web data stream, and click on the confirm changes and the settings are saved but no new web data stream is created and the same error above appears. web-2.mp4@aaemnnosttv since #6330 is going out in 1.98.0, do we have any plans to include this fix in the same release? Otherwise we will have a bug which I feel will cause support tickets. |
@wpdarren it's not really a bug on our end but not a great experience for the user, I agree. Even though it's not too hard to reproduce, it should be a rare edge case. Even if we did get a request about it, there is an easy work around to simply rename the existing data stream and try again. Ideally we'd address it in the upcoming release, but it needs to wait until all the high priority issues for GA4 reporting are done. |
We also need to update the
It should be rendered in the same way how we render the profile name field: site-kit-wp/assets/js/modules/analytics/components/setup/SetupFormUA.js Lines 102 to 106 in 996e3ac
In other words, we need to render this component on the next line below all 3 components (account/property/webdatastream selects). It means that we need to update setup and settings forms to have the same behavior on all of them.
This component also should display the create web data stream error instead of doing it in the web data stream select if we create a new data stream. |
@eugene-manuilov Thank you for the feedback. IB updated |
Nice. Thanks, @zutigrm. IB ✔️ |
QA Update
|
QA Update
|
Hi @mohitwp. I have actually noticed this problem once before. This problem has more to do with the submit settings button ("Confirm Changes"/"Save") rather than the web data stream name input. Currently, if there are no changes in the settings, or there is an invalid setting value, the button simply says "Save", whereas, it should keep saying "Confirm Changes" but just be disabled, so that the user cannot submit. For example, to understand this behaviour, try to edit settings of Tag Manager. When you're there, choose to create a new container, but keep the field blank. Notice how the submit button says "Save" and you can still submit, where you shouldn't be able to. Once you click "Save", it just gets stuck at the loading state and never completes. As this issue doesn't seem specific to the web data stream input but the settings edit form for modules in general, do you think it might be wiser to create a new issue for further investigation? Thanks! |
QA Update ✅As per slack discussion we will address above issue through #8467
Note : User is able to save settings even if user enter already exist web data stream name or do not provide any web data stream name which is known issue as per QAB. I created separate issue for this - #8467 1) Verified web data stream creation and validation when creating new analytics a/c during Analytics set up. Recording.847.mp42) Verified new web data stream creation and validation when connecting with existing analytics a/c during Analytics set up. 3) Verified new web data stream creation and validation under Analytics settings. |
QA Update ❌Moving this back to execution due to regression issue found during release QA. |
QA Update ✅
Recording.861.mp4 |
|
The above issue has now been addressed through a follow-up PR. This is back in QA. |
QA Update: ✅Verified:
|
Feature Description
GA4 requires that all data stream names for a property are unique as can be seen in the admin interface:
This constraint can result in failing API requests when attempting to create a data stream that has a non-unique name
While data streams are not the GA4 equivalent of UA views, this is somewhat related to the work we did for enhancing the creation of a new view (see #716).
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Note: this is essentially the GA4 version of #716
Implementation Brief
assets/js/modules/analytics-4/datastore/constants.js
FORM_SETUP
assets/js/modules/analytics-4/components/common/WebDataStreamNameInput.js
TexField
component to render the input field. Default value should beSet up a new web data stream
, and this value should be saved toFORM_SETUP
, under, saywebDataStreamName
WEBDATASTREAM_CREATE
option is selectedProfileNameTextField
for inspiration, as it handles similar thing just for UA counterpartassets/js/modules/analytics-4/datastore/settings.js
:webDataStreamName
to thecreateWebDataStream
actionvalidateCanSubmitChanges
assets/js/modules/analytics-4/datastore/webdatastreams.js
:createWebDataStream
actionwebDataStreamName
value, it should be required and not emptyfetchCreateWebDataStream
fetchCreateWebDataStreamStore
to acceptswebDataStreamName
parameter and forward it to the API requestassets/js/modules/analytics-4/components/setup/SetupForm.js
:WebDataStreamNameInput
component bellow the other 3 select components, ifWEBDATASTREAM_CREATE
is selectedassets/js/modules/analytics-4/components/settings/SettingsControls.js
:WebDataStreamNameInput
, you can see example hereincludes/Modules/Analytics_4.php
POST:create-webdatastream
displayName
to pull data fromwebDataStreamName
Test Coverage
WebDataStreamSelect
component, it would be handy to add it as part of this issue, and at least cover the new field behaviour with a test case, as a start.assets/js/modules/analytics-4/datastore/webdatastreams.test.js
, forcreateWebDataStream
to reflect the change of having newwebDataStreamName
parameterassets/js/modules/analytics-4/datastore/settings.test.js
createWebDataStreamsEndpoint
is used, includewebDataStreamName
where/if neededQA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: