#display In-App Custom Ads
10 messages · Page 1 of 1 (latest)
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.
Thanks @opal rain , I don't get the second part of your message, can you please explain it more. I want to understand how I can use function here
In summary, I think he means if you have any sort of algorithm that will recommend the ads to users you'd have to create a function that determines the next ad to show and return the id of that ad document in your Ads collection.
I would recommend you to make Appwrite Function that analyses users information and recent ads that were shown/clicked.
In the quote above he's just giving a general example of what such an ad recommendation algorithm might do. Generally ads are targeted and this is usually partly based on user information/metrics and also engagement .Also such an algorithm will probably give more weight to the same kinds of ads previously "clicked" by the user. And finally, depending on the use case you may not want to display an ad to the user twice so the algorithm may exempt ads already shown to the user. The best fit ad is then returned from the function and you can display in the users feed.
Please don't tag people as it can be disruptive
Understood now, thanks
thanks @late ore @opal rain for giving me this insight...
Do you have more doubts regarding this? Or I can close the post?