yarwest / Soundboard

Collection of memes from our group of friends brought together in a soundboard
http://yarnoboelens.com/soundboard
MIT License
0 stars 0 forks source link

[WEB] Statistics! #6

Open wimpy1555 opened 6 years ago

wimpy1555 commented 6 years ago

Is it possible to keep record of the amount of times each sound is clicked/played and in which timespan?

wimpy1555 commented 6 years ago

(yes i'm a "statistics slut" if you did'nt know that already)

wimpy1555 commented 6 years ago

With this, if a sound apears to almost never be clicked it could perhaps be removed.

yarwest commented 6 years ago

I mean, it is, but would have to become a part of some sort of persistent memory, which is currently not really present (apart from the hardcoded files and such). Besides that, I am not sure how to track timespan (I guess a click timestamp should work)

wimpy1555 commented 6 years ago

SQL? :P

You can easily make nice Queries for these things..

yarwest commented 6 years ago

I guess an SQLite database (or something similar) would be the best fit, but since the entire application is based on front-end interactions right now, it might be tricky to set that up (unless an entire backend sections is set up of course)

wimpy1555 commented 6 years ago

Assuming every Sound has a unique value, can't you just make a post request with this ID and a small backend that listens to these requests and inserts them in a small database? Then just let sql add the timestamp.

yarwest commented 6 years ago

Plausible, would also remove the need for the earlier mentioned hardcoded files and enable an easier set up for the CRUD actions.