We’re happy to share that all Forem users now have access to the Analytics Dashboard!
This is a feature that has been around for some time, but has always been limited to a specific subset of our users with a specific role. But as of today, it is available to everyone!
Accessing the Analytics Dashboard
To access your Analytics Dashboard, head over to your Dashboard and click on the Analytics tab on the sidebar.
Within your Analytics Dashboard, you’ll be able to view some in-depth user metrics, including some high level data around comments, reactions, readership, and new followers. You can also filter this data by week, month, or all time.
You’ll also be able to look at specific statistics for individual posts. On every post that you author, you’ll see a Stats
button.
That button will take you to a post-specific Analytics Dashboard, where you can view statistics for an individual post.
Analytics for Organizations
If you are a member of an organization, you’ll be able to view analytics around any posts you author for that organization. You can access organization-specific statistics from any post published under that organization.
If you are an organization administrator, you'll be able to view the organization's Analytics Dashboard directly below your personal Analytics Dashboard.
We hope that making this feature available to everyone will help members of Forem communities better understand their own content and gain deeper insights into how they are interacting with the community.
For the curious ones out there, you can check out the relevant pull request for this feature below:
Remove pro role + expose analytics to all users via dashboard #13156
What type of PR is this? (check all applicable)
- [x] Refactor
- [x] Feature
- [ ] Bug Fix
- [ ] Optimization
- [x] Documentation Update
Description
Related Tickets & Documents
Closes https://github.com/forem/internalEngineering/issues/403.
QA Instructions, Screenshots, Recordings
To QA this feature, first make sure that you have a user locally who does not have the :pro
role:
pry(main)> u = User.find_by(username: 'your-username-goes-here')
=> #<User id: ...>
]pry(main)> u.has_role? :pro
=> false
QA Instructions, Part I:
- Try going to
/dashboard
. On the bottom left of the sidebar, you should see anAnalytics
option in the menu. Click on that:
- Clicking on that should take you to your "Analytics Dashboard", which previously was the "Pro dashboard". Make sure there is no "pro" language (everything should read "analytics dashboard):
QA Instructions, Part II:
- Create an organization (here's the route to do so).
- Go back to your
/dashboard
. Note that theAnalytics
option still renders as before, only now you also should see anAnalytics [Your Org Name
option as well (click on that one!):
QA Instructions, Part III:
- Assign your user either an
:admin
or:super_admin
role, and go to/admin/users
. Select a user to edit, and scroll down to the "User Status" section of the page. Click the dropdown, and ensure that thePro
role does not show up there:
UI accessibility concerns?
No HTML or UX changes happens as a part of this PR, so I don't think so.
Added tests?
- [ ] Yes
- [x] No, and this is why: I've updated pre-existing tests and added new ones where necessary (but didn't overhaul the testing significantly enough IMO to check the "Yes" box
😉 ) - [ ] I need help with writing tests
[Forem core team only] How will this change be communicated?
Will this PR introduce a change that impacts Forem members or creators, the development process, or any of our internal teams? If so, please note how you will share this change with the people who need to know about it.
- [ ] I've updated the Developer Docs and/or Admin Guide, or Storybook (for Crayons components)
- [ ] I've updated the README or added inline documentation
- [x] I will share this change in a Changelog or in a forem.dev post (I will work with @cmgorton to make sure this is highlighted/announced to the community since we are sharing a feature that was previously only available to handful of folks!)
- [x] I will share this change internally with the appropriate teams
- [ ] I'm not sure how best to communicate this change and need help
- [ ] This change does not need to be communicated, and this is why not: please replace this line with details on why this change doesn't need to be shared
Are there any post deployment tasks we need to perform?
After this feature is out, we will need to delete any Pro
roles from the database. Even with the "pro" code all removed, the role still exists in the database, as evidenced by this screenshot of my local Forem instance, once I added the :pro
role to my own user and deleted the "pro" code (seems like the Role
instance still exists in the database):
I think that this only applies to the DEV community, but I'm not entirely sure about that and could use some gut checks there. My thought was to either write a DataUpdateScript (if this applies to many communities), otherwise maybe we can delete the :pro
role directly via a DEV console?
A script would definitely be more comprehensive, but if no other Forem instance has pro
roles, that feels much more heavyweight than we need it to be.
What gif best describes this PR or how it makes you feel?
We hope you’ll take a peek at this feature and give it a spin! As always, we’d love to know what you think of it and how might improve on it to make it even more useful. 😃
Top comments (8)
Awesome feature 😁
I've come across a really interesting bug
If you click through the three tabs then mouse over a chart it may (I couldn't work out what the actual trigger was) change to a chart from another tab.
Seems my gif won't embed so here's a link to it. Link to gif
Hi @link2twenty ! Would you mind opening up a bug report to document this? I'd love to get someone on our team to investigate this, and having it in an issue format will ensure that we can get this prioritized and worked on :)
Thanks so much for playing with it and taking a look! I'll try to get your bug report prioritized as soon as possible once we have it in issue format 🙏
I've added the issue, thanks ☺️
[Bug] Analytics graphs changing randomly #13222
Describe the bug The graphs in the new analytics tab seem to change
randomly
.To Reproduce
Expected behaviour Only the chart for the current period should be seen
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information): N/A
Additional context It's such a random bug it must be how chartjs is storing the graphs or something.
Thanks so much for creating an issue, @link2twenty ! I am going to advocate for our engineering team to prioritize this so that we can begin to investigate starting next week :)
Finallyyyyyyyy :D
Brilliant !
So dope! I'm so siked this is open to all now. 😎
Wow, love it!! 😍