Skip to content
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

Stats: Improvements to video stats #63173

Merged
merged 23 commits into from
May 2, 2022
Merged

Stats: Improvements to video stats #63173

merged 23 commits into from
May 2, 2022

Conversation

thedebian
Copy link
Contributor

Changes proposed in this Pull Request

This PR updates video stats to add watch time and impressions.
It also changes "plays" to "views" and fixes some existing issues with Video stats.

Testing instructions

  • On a sanboxed public-api
  • Apply D79611-code
  • Apply this PR
  • Open your Calypso backend
  • Select the "Stats" menu
  • ✅ The "video stats" section should work.
  • Click on the video stats
  • ✅ You should see a list of video stats for the selected period
  • ✅ You should be able to click on "Download CSV" and generate a CSV from the visible stats
  • On a stat line, click on the video title
  • ✅ You should be redirected to the media item in the Media library
  • Go back
  • Click on each stats (views, impressions and hours watched)
  • ✅ Each stat should redirect to the appropriate stat section (with some bars)
  • ✅ The stats should match
  • ✅ The stats should reflect your currently selected time period
  • ✅ Using the "year" time period, the graph should display month-by-month
  • ✅ Using another time perios, the graph should be daily

Related to Automattic/greenhouse#1170

@thedebian thedebian added Stats Everything related to our analytics product at /stats/ [Feature] VideoPress A feature to help you upload and insert videos on your site. labels Apr 29, 2022
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 29, 2022
@github-actions
Copy link

github-actions bot commented Apr 29, 2022

@matticbot
Copy link
Contributor

matticbot commented Apr 29, 2022

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~1042 bytes added 📈 [gzipped])

name                parsed_size           gzip_size
stats                   +4317 B  (+0.6%)    +1056 B  (+0.6%)
home                     +140 B  (+0.0%)      +19 B  (+0.0%)
google-my-business       +140 B  (+0.0%)      +19 B  (+0.0%)
posts-custom              -36 B  (-0.0%)      -14 B  (-0.0%)
posts                     -36 B  (-0.0%)      -14 B  (-0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~19 bytes added 📈 [gzipped])

name                                       parsed_size           gzip_size
async-load-store-app-store-stats-listview       +140 B  (+0.3%)      +19 B  (+0.1%)
async-load-store-app-store-stats                +140 B  (+0.1%)      +19 B  (+0.0%)
async-load-calypso-my-sites-sidebar             +140 B  (+0.1%)      +19 B  (+0.1%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor Author

@thedebian thedebian left a comment

Choose a reason for hiding this comment

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

Code review seems 👍

// Only show loading indicators when nothing is in state tree, and request in-flight
const isLoading = ! this.state.loaded && ! ( data && data.length );

// TODO: Support error state in redux store
Copy link
Contributor

Choose a reason for hiding this comment

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

Errant TODO - not sure we planned to do this or it was copy-pastad?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably 🍝 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Verified that it was copied, removed in 5ef4172

Co-authored-by: John Caruso <johncaruso@gmail.com>
@roundhill roundhill changed the title Add/video stats complete Stats: Improvements to video stats May 2, 2022
Copy link
Contributor

@jgcaruso jgcaruso left a comment

Choose a reason for hiding this comment

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

Looks good!

@roundhill roundhill added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 2, 2022
@roundhill roundhill merged commit ae401a8 into trunk May 2, 2022
@roundhill roundhill deleted the add/video-stats-complete branch May 2, 2022 19:41
@a8ci18n
Copy link

a8ci18n commented May 2, 2022

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7279210

Hi @thedebian, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include this string: Hours Watched

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented May 11, 2022

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] VideoPress A feature to help you upload and insert videos on your site. Stats Everything related to our analytics product at /stats/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants