
Hey guys, I just build a social app where users can post videos, share image and text, users can like, share and comment on post, but I want a situation to show the numbers of view on a post.
Please how do I achieve this?

Everytime the post comes in to view, check if the currenr user has already "seen" it. If not, add a new item. Incrementing count on every seen would inflate the view count exponentially due to duplicity.
Maybe add an array attribute in the same post document, or create a relation with a collection or a complete separate collection for the same.
An array based attribute could get harder to manage though if the size grows substantially.
Recommended threads
- deno 2 Cloud random errors
we have big problems with the functions. although we do not change anything in the function, we have the following random behaviour: - no scope permissions erro...
- Invalid Origin Error – Need Help Registe...
Subject: Invalid Origin Error – Need Help Registering Platform Hi Appwrite Support <:appwrite:1156975611466764298> , I'm encountering an issue when trying to ...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
