[GLA Analytics] Add view model for Google Campaigns analytics card #13199
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.
Closes: #13186
Why
This adds the UI support needed to display the Google Campaigns analytics card in the Analytics Hub. (Fetching and displaying the card will be done in another PR; for now, the card is still not displayed.)
How
AnalyticsWebReport
, so we can link from the card to the full web report.showImage
toTopPerformersRow.Data
. This defaults totrue
but allows us to hide the image placeholder in the list of campaigns.topPerformersTitle
toAnalyticsTopPerformersCard
, to allow a different title for the card and for the list of top performers. (In this case, "Google Campaigns" for the card and "Campaigns" for the list.)GoogleAdsCampaignReportCardViewModel
to handle the data for the Google Campaigns card.GoogleAdsCampaignStats
for the current and previous period to get the current Total Sales metric and percent change.GoogleAdsCampaignStats
for the current period to get the list of top 5 campaigns by total sales.Testing information
The new Google Campaigns card isn't yet displayed in the Analytics Hub. There should be no changes to current behavior, in particular no changes to the images showing in the existing top performers cards (Products and Bundles).
To test:
Screenshots
RELEASE-NOTES.txt
if necessary.