
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
- Resource limit
I am getting resource limit errors even tho i didnt exceeded
- The Content Security Policy (CSP) is cau...
The main issue is that the deployed workflow is launching to a blank page in which the CSP is the main culprit. None of the recommended fixes worked so far. Any...
- Server error when selecting `*.*` in get...
It seems that `createRow` returns the created row with all relationship fields populated 1 level deep. I'm trying to replicate that behavior with `getRow`, so I...
