-
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
Add GET:report datapoint for GA4. #6379
Merged
aaemnnosttv
merged 57 commits into
develop
from
enhancement/6172-analytics-4-get-report
Jan 13, 2023
Merged
Changes from 4 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
54b16e1
Add initial Analytics-4 GET:report implementation.
techanvil 45e9dde
Add metric aggregations to match UA reports.
techanvil 384d626
Update return type.
techanvil 065681e
Fix typo.
techanvil ad4f5df
Add a reminder to remove metrics/dimensions for subsequent allow-list…
techanvil 423a820
Update error codes for GA4.
techanvil a0974d6
Update metric validation.
techanvil f56e24d
Update metric parsing to reflect requirement for `name`.
techanvil 88a47bc
Update comment.
techanvil b9f041d
Fix test.
techanvil 695a5ec
Add PHPUnit test for GET:report.
techanvil 4c0b1a9
Remove metrics and dimensions from their allow-lists.
techanvil 717bf16
Flesh out GET:report test coverage.
techanvil c1a6229
Re-order report parameter validation.
techanvil 857f745
Fix metric validation.
techanvil 05db15a
Add tests for report parameter validation.
techanvil 6e2da29
Remove comment.
techanvil 43df5f9
Update parameter description.
techanvil 7ed6d1f
Simplify test slightly.
techanvil 7056c14
Fix comment.
techanvil 2b0bfee
Add missing @param doc line.
techanvil b714579
Fix comment alignment.
techanvil 98243e0
Trim unused imports.
techanvil b586ad2
Extend test coverage to all GET:report input parameters.
techanvil 13334bf
Add notes about required/optional parameter usage.
techanvil 74e7b4d
Retrieve property ID from module settings within GET:report handler.
techanvil cb54367
Use the single-report runReport rather than batchRunReports.
techanvil ef6d6c7
Remove unnecessary fake HTTP client.
techanvil 00c9fdd
Change request_handler_calls to be an instance variable.
techanvil f78b1f7
Move various object creation into test setup method.
techanvil 3be82f8
Extract fake HTTP client creation and refactor a bit.
techanvil 945e79b
Remove get_report helper method.
techanvil b5e7e32
Replace setup_report with enable_shared_credentials helper method.
techanvil 6236f38
Only enable dashboardSharing for those tests which are relevant.
techanvil 850fb82
Order services by name.
techanvil 790d8c3
Create helper methods for setting shared metrics and dimensions.
techanvil 15be316
Add authenticated user variants for all relevant report tests.
techanvil 1be6cb4
Remove @since from test function.
techanvil e6a969d
Remove unused import.
techanvil eca7c7e
Return error if no connected property and move calls to normalize_pro…
techanvil 6407fd5
Don't fake HTTP client for tests which don't need it.
techanvil 4093e6f
Add test for insufficient permissions.
techanvil a61350a
Add test for default date range.
techanvil 203fbe0
Remove legacy date params.
techanvil 4037108
Use permute_site_hosts rather than mapping result of permute_site_url.
techanvil 82e3567
Reuse setup_user_authentication.
techanvil 732f9be
Set new admin as owner of Analytics 4 module for test.
techanvil 70e4d78
Set shared roled from current user, and use default management: owner…
techanvil 93a6b27
Extract setting user access token to a new trait.
techanvil e9c0a41
Merge branch 'develop' into enhancement/6172-analytics-4-get-report.
aaemnnosttv 38f8695
Change status code to 400 for metrics and dimensions validation errors.
techanvil 80476e8
Change the "no property ID setting" error to be a 500.
techanvil f85fc3e
Move call to set granted scopes into the test cases.
techanvil 06d6faf
Add missing import.
aaemnnosttv 615f0ad
Remove HTTP status from DS validation.
aaemnnosttv a3183f3
Require property ID after required params.
aaemnnosttv 01c24e5
Update formatting of returned errors.
aaemnnosttv 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
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.
I can see why you used the status here as well but let's not do that because it would imply we should make the same changes in the other modules that also implement this check. Aside from that, I think the default status is okay here because the client is not making an invalid request – the validation is applied due to internal state/conditions related to dashboard sharing.
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.
No worries and thanks for changing it back 👍