-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Redefine when revenue information is displayed on All Websites Dashboard #22886
Open
mneudert
wants to merge
6
commits into
5.x-dev
Choose a base branch
from
dev-15665
base: 5.x-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
mneudert
added
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Needs Review
PRs that need a code review
labels
Dec 19, 2024
|
||
### Breaking Changes | ||
|
||
* When requesting goals for multiple sites at once using `Goals.getGoals`, the result will no longer be indexed by `idgoal` anymore. Requesting the goals for a single site will still return them indexed by `idgoal`. |
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.
Suggested change
* When requesting goals for multiple sites at once using `Goals.getGoals`, the result will no longer be indexed by `idgoal` anymore. Requesting the goals for a single site will still return them indexed by `idgoal`. | |
* When requesting goals for multiple sites at once using `Goals.getGoals`, the result will no longer be indexed by `idgoal`. Requesting the goals for a single site will still return them indexed by `idgoal`. |
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
github-actions
bot
added
the
Stale
The label used by the Close Stale Issues action
label
Dec 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Needs Review
PRs that need a code review
Stale
The label used by the Close Stale Issues action
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.
Description:
In the current All Websites Dashboard (AWD), the
revenue
information is always shown, unless theGoals
plugin is disabled.For the redesigned AWD, this condition will be changed to only display
revenue
information if:Goals
plugin is enabledThis check is done on a per-user basis, a user needs at least view access to any site that would quality for displaying revenue information.
The API
Goals.getGoals
was fixed to properly return goals for multiple sites. The goal list was indexed byidgoal
, but that value is not unique across sites, so if two sites hadidgoal = 1
, you would only get one result instead of two. The API was changed to NOT index the return list with any defined keys to work around this limitation. Requesting goals for a single site will still return them indexed byidgoal
.Fetching 40k goals across 10k sites took a varying time between 500ms and 1250ms in my development environment according to XHProf (around 50% of the total runtime), with most of the time spent in
Goals\API::formatGoal()
. The API will not be called if there is at least one ecommerce site available.Without XHProf active, the response times were always hovering between 175ms and 200ms locally (according to
curl
), and around 75ms to 100ms without any of the new checks.If necessary, we can add an (internal?)
Goals.hasAtLeastOneGoalWithRevenue($idSites)
that could take care of that check in a single database query and circumvent the goal formatting. We can also take this approach if the change toGoals.getGoals
qualifies as a breaking change and can not be done in a feature release, even though it is also a fix.Fixes #5045
Refs DEV-15665
Review