Hey! :wave: How do you normally store analytics da...
# orm-help
m
Hey! 👋 How do you normally store analytics data that is not consistent in a database? I'm using postgres and have a model that is also not consistent (it has a
config
json for the frontend). I want to track analytics (button clicks, hovers, views) of the elements. Would I store it as simple JSON in the model field called
analytics
for example? Can updates collide when incrementing a count for example? I would love to hear your feedback on this because I want to have it in the same database (no separate service beside the postgres database). 🙂
n
Hey Marvin 👋 Storing JSON in a column is a straightforward and ideal approach, you could definitely go ahead with it. For making updates to the JSON file you may want to look into http://jsonpatch.com/
m
Thanks, I will look into it! 🙂