You could write a little JavaScript and write that preference to Custom Data
see Users - Canvas LMS REST API Documentation
On the backend loop through students and get the Custom Data on every user.
The user has the ability to write and delete there as well, and you have to be aware of other scripts writing to that space, like Sorting Dashboard Course Cards
---
A little more hacky, but you could possibly write the preference to some other endpoint to make retrieving the data easier. Maybe a conversation, discussion, append it to a course page with student write permissions... Pages - Canvas LMS REST API Documentation
Assuming you don't want to create a bad experience for the student, having them enrolled in a random course or seeing conversations they didn't create... don't execute the code every time they touch the dashboard etc.
---
Possibly a little less hacky, silent even, might be executing a tiny GET request on the dashboard (once with a cookie or localStorage) with a query string parameter for the preference. Then if you have Canvas Data run a query on the requests table.
$.get('?dashboard_view='+ENV.PREFERENCES.dashboard_view)
I have used parameters like this with automated messages to see if students click the course link from the notification/email instead of coming back to Canvas. I'll check over the next couple days to see if I can find that in the data.
Depends on how much code you want to write and whether you affect the end user experience.