
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
- Error importing data after server migrat...
Hello, I recently purchased a new web server and when trying to migrate my data from the old server to the new (both self-hosted instances of appwrite on coolif...
- Not Able to Reach Cloud
When I open the appwrite cloud I am getting error. Can you help please?
- deleteDocments is not a function
Hello. At the bottom of my project's console, in the footer, I have `Version 1.7.4`. However, when I run my server side function, I am told that `databases.dele...
