-
Notifications
You must be signed in to change notification settings - Fork 297
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
Request scope only if it's needed #9840
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
7a33fe2
Check if scope is needed before requesting it.
nfmohit 4218d13
Add test coverage.
nfmohit 2afedfb
Fetch available audiences and custom dimensions as part of the hook c…
nfmohit 6583661
Merge branch 'develop' into enhancement/#9595-groups-edit-scope.
nfmohit 1ecbfe9
Merge branch 'develop' into enhancement/#9595-groups-edit-scope.
techanvil 33bccad
Restructuring `onEnableGroups()` / `enableAudienceGroups()` to check …
techanvil 57996b5
Update `needsAnalytics4EditScope()` to check whether the required cus…
techanvil 1395ca8
Only sync audiences/custom dimensions once per audience group enabling.
techanvil 89ddb91
Revert unneeded export of `requiredAudienceSlugs`.
techanvil 644bf77
Revert property name change.
techanvil 2acc27d
Fix `needsAnalytics4EditScope()` return value.
techanvil 7c18dd4
Prevent `onEnableGroups()` from triggering unexpectedly.
techanvil bc4f6c2
Add JSDoc for new actions.
techanvil 4c301e3
Remove redundant check for failed audiences.
techanvil 159ed82
Remove stale comment.
techanvil 55ed491
Remove unnecessary property rename.
techanvil 6e69a3a
Rename variable.
techanvil 707ffd8
Revert unneeded changes.
techanvil d65d097
Fix `SettingsCardVisitorGroups/SetupCTA` test.
techanvil 30da750
Assert that the `sync-custom-dimensions` endpoint was requested.
techanvil 43d819c
Fix `enableAudienceGroup()` tests.
techanvil 22842ca
Fix `AudienceSegmentationSetupCTAWidget` test.
techanvil 1bde374
Update `getSelectionFromExistingAudiences()` to be an async function …
techanvil 5547592
Update `retrieveInitialAudienceSelection()` to be an async function r…
techanvil 92e2e15
Rename `needsAnalytics4EditScope()` -> `determineNeedForAnalytics4Edi…
techanvil 488b22d
Add a comment to clarify why we don't set isSaving back to false when…
techanvil 9a03b2a
Clarify the `isSaving` comment.
techanvil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why invalidate the default queue? I'd expect this should invalidate the setup CTA resolution, but I'm not entirely sure why it would invalidate this for either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this was introduced as part of the banner notification refactor as a way to show the CTA immediately. We do have an issue in IB to address this in a more elegant way: #9453
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; what I mean is that this invalidates the default group, but the CTA is registered with other setup CTAs in their respective group:
site-kit-wp/assets/js/modules/analytics-4/index.js
Lines 730 to 734 in 9a03b2a
Edit: actually, this is about showing the setup success banner right away – which is in the default group – so that makes sense. I missed that detail in your response initially 👍