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

Directory: Create periodic snapshots of specific stats for tracking over time #292

Closed
coreymckrill opened this issue Jul 15, 2021 · 0 comments · Fixed by #294
Closed

Directory: Create periodic snapshots of specific stats for tracking over time #292

coreymckrill opened this issue Jul 15, 2021 · 0 comments · Fixed by #294
Assignees
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc

Comments

@coreymckrill
Copy link
Contributor

coreymckrill commented Jul 15, 2021

Pulling this issue together from a few other places, mainly this comment.

The idea is to keep track of a few key stats (listed below) by generating a "snapshot" post containing the stats numbers at that particular moment, very similar to how it's done on the 5ftf site.

Open question: should snapshots be generated daily, weekly, or monthly? The 5ftf stats are bi-weekly, but things are likely to change more often on the Pattern Directory, so daily might make the most sense here.

Initially, the stats to track are (list subject to change):

  • Total number of published patterns
  • Total number of unlisted patterns
  • Total number of favorites
  • Total number of flags, any status (reported patterns)
  • Total number of pending flags
  • Total number of resolved flags

We could also grab some other related stats, such as:

  • Total number of patterns with at least one favorite
  • Pattern(s) with the most favorites
  • Total number of patterns with at least one flag, any status
  • Total number of patterns with pending flags
  • Total number of patterns that have reached the flag threshold and have been set to pending status for moderator review

Once frontend pattern creation launches, we might also want to see things like:

  • Total number of published patterns for each category
  • Total number of users who have at least one published pattern
  • User(s) with the most published patterns
  • User(s) with the most flagged patterns
@coreymckrill coreymckrill added the [Component] Pattern Directory The backend of the pattern directory: submission, management, etc label Jul 15, 2021
@coreymckrill coreymckrill added this to the Initial Launch milestone Jul 15, 2021
@coreymckrill coreymckrill self-assigned this Jul 15, 2021
coreymckrill added a commit that referenced this issue Jul 16, 2021
Adds functions for gathering stats about patterns and saving them to snapshot posts, similar to what is done on the 5ftf site. A cron job is set up to run at 00:00 UTC daily to save a snapshot. Also adds a simple, work-in-progress page in WP Admin to view the current stats and some basic info about the number of snapshots that have been created.

Fixes #292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant