Skip to content

Conversation

@rachelmcr
Copy link
Contributor

Closes: #8156
⚠️ Depends on #8157 ⚠️

Description

This PR adds Storage support for retrieving the Average Order Value data from requests to GET /wc-analytics/reports/revenue/stats, to use on the Order Analytics card in Analytics Hub.

(We already make requests to this endpoint and store the data when dashboard stats load on the My Store screen but we aren't yet using Average Order Value in the app.)

Changes

  • Adds Core Data Model 78.
  • Adds averageOrderValue attribute to OrderStatsV4Totals storage entity.
  • Adds migration test for Model 77 to 78 migration.

Testing

  1. Build and run the app and confirm dashboard stats load.
  2. Replace a build from trunk with this build and confirm the migration works with no Core Data errors or warnings.

Submitter Checklist

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@rachelmcr rachelmcr added the category: tracks Related to analytics, including Tracks Events. label Nov 19, 2022
@rachelmcr rachelmcr added this to the 11.4 milestone Nov 19, 2022
@rachelmcr rachelmcr marked this pull request as ready for review November 19, 2022 09:33
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Nov 19, 2022

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8162-008f233 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

Base automatically changed from issue/8156-orders-analytics-networking to trunk November 21, 2022 10:58
Copy link
Contributor

@ealeksandrov ealeksandrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

nit: StatsStoreV4Tests needs an update for averageOrderValue in samples.

@peril-woocommerce
Copy link

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@rachelmcr
Copy link
Contributor Author

nit: StatsStoreV4Tests needs an update for averageOrderValue in samples.

Oops, yep, fixed that in 008f233. Thank you!

@rachelmcr rachelmcr enabled auto-merge November 21, 2022 12:09
@rachelmcr rachelmcr merged commit fe33de1 into trunk Nov 21, 2022
@rachelmcr rachelmcr deleted the issue/8156-orders-analytics-storage branch November 21, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: tracks Related to analytics, including Tracks Events.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Analytics Hub] Add support for Orders Analytics card data

4 participants