
Hello pals, I have a App in production where I have Post Collection and I just created another Collection for Ads.
What I want is that when the post feeds it's loaded into the user view the ads should be displayed inline with the post feeds.
I guess my analogy might be wrong, Please what's the best way to achieve this

Hi there 👋 It highly depends on your strategy for displaying ads.
One solution I can see is to use cursor pagination (infinite scroll), and set psge size to lets say 20. Everytime you load next set of posts, you can also load 1 and display that. With this approach you have control over how often ads display.
What will be problematic with this approach is algorithm for what ad shows. If that is of concern, I would recommend you to make Appwrite Function that analyses users information and recent ads that were shown/clicked. Such function can return ad document ID and yoy can then load it from the client.
Recommended threads
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Custom Domain Issue
i have added a custom domain about 21 hours ago, but till now there is no SSL certificate is active on it. but if i do DNS check via https://dnschecker.org/#C...
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
