Back

display In-App Custom Ads

  • 0
  • Flutter
  • Cloud
Zionnite
24 Mar, 2024, 07:45

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

TL;DR
To display in-app custom ads along with post feeds, developers can use cursor pagination to control when ads show. Set a page size (e.g. 20) and load 1 ad along with each set of posts. To manage which ad is displayed, create an Appwrite Function that analyzes user and ad data, returning the ad ID for display. This approach allows for control over ad frequency and relevance.
Meldiron
24 Mar, 2024, 07:49

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.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more