-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: Set up chart view statistics #1613
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
LGTM 🚀 Thanks!
@bprusinowski is it possible to get frequency per chart_key for the most frequently visited charts with this? |
@Rdataflow yes, we'd need to add a dedicated route to be able to retrieve such information directly from the application. Are you thinking about this in context of Varnish cache invalidation, or to add this to the Statistics page? Addition of this logic is a next step for managed cached endpoint PR 👍 |
@bprusinowski great. I was thinking of it mainly for varnish and internal statistisch use👍️ |
Closes #1611
Contributes towards #1596
Chart view analytics
This PR sets up a new
ConfigView
table in our database which is used to track the chart views. We store every chart view, to potentially be able to make use of this information in the future and e.g. show charts trending in the last week or month, to understand at what time of the day the charts are viewed, how the metrics are influenced by e.g. Open Linked Day events, etc.A chart view is counted when:
/v/
page,/embed/
page,or precisely, when
getServerSideProps
function is triggered for these pages.View statistics
There's also a new card that shows statistics on views in the Statistics page (see this link). The card will be shown when the first views are recorded in the database (the screenshot comes from my local development environment).