Preventing custom list reload on update

Due to an unfortunate Google AdMob related blocking incident, I decided to create my own sponsored adverts, displaying content near to the app user’s location. Sounds easy, but it’s been unexpectedly gnarly!

I have a custom list of Sponsors, filtered to X miles of the users location and ordered by the number of impressions, lowest to highest. The list is restricted to one row. Now, when the sponsor loads, I have a timer, with an action to increment the current impression count by 1. This works, however, because that sponsor no longer has the lowest impression number, it immediately loads in the next sponsor. Frustrating.

To minimise annoyance to the user, I’ve had to set the counter to 30 seconds, which means that it nicely swaps out the sponsor banner for the next one, but only updates the impression number at the end of 30 seconds of display. I’ve also had to implement a counter to hide the entire sponsor frame after 4 banners are displayed, minimising potential unnecessary impressions.

Can anyone suggest a better solution please? Ideally I’d like to update the impression number after 1 second, but that just loads in the next sponsor banner.

Thank you

Hi @Tone,

This is an interesting one.

A few ideas (can’t test them now although):

  • Disable autorefresh on the list with ads;
  • Don’t show the Ad using a list but use 2-step flow to display the Ad. Let’s assume the Ad is an image. Then you can add a “helper” property to Users collection, call it “current ad”, type Image. On the list with Ad, instead of showing the image itself, you only keep a timer which updates Logged-in User → Current Ad (and increases the counter).

Best,
Victor.

Morning and thank you for your suggestions @Victor
I did wonder whether I could disable auto update on the list in the advanced options, however it didn’t make a difference - assuming it’s the option to disable refresh when new items are added to the list. Your second suggestion sounds interesting, however I hope that as the app grows, there could be quite a few ads relevant to different locations. The distance of the user from the advertiser plays a big part in keeping the banner ad relevant to them. Perhaps I’m just not quite understanding the concept. The banners are all images and clicking the banner opens a sponsor detail screen, with links to their website etc.

@Tone the logic is the same. Instead of showing the banner directly in the list (and you have distances / filters / etc.), you are taking this banner from the list and storing it in logged-in user property. So each time the timer finishes its job, the banner is updated.

The issue I see now though that if the list is refreshed, then timer will be run every time after refresh, so the problem isn’t solved.

My idea in general is that you need to “detach” 2 processes: (1) the process to decide which banner you’d like to show and (2) showing the banner.
In the flow with 2 screens that might be not difficult to achieve: on screen 1 you’re showing the list filtered by impressions and have a button in it. On button press you, say, update logged-in user with the current image (or store id of the item of the list). On the next screen you display the image or display a list filtered by id, not impressions.

The issue with timer is that it will “re-run” every time the list is refreshed, so it is cumbersome to avoid this (maybe visibility conditions can help).

Best,
Victor.

Thanks @Victor I think i understand what you’re describing! In this case, I’d have to take more than the banner ad to drop onto the current user record (web address etc), but the same concept applies. The timer would have to run and then update a flag/input to then conditionally hide the list, to prevent the timer running again, as well as populating the sponsor web address etc. The image updates based on the user helper image, then clicking on the image opens a screen which lists the sponsor detail from the updated user collection. My only concern is the number of update actions potentially slowing the app.

1 Like

@Victor I’m sure that you never doubted it really, but just to confirm that the solution appears to work a treat, thank you! To confirm, I have it set up as follows:

  1. Sponsors collection is loaded into an empty custom list (restricted to one row, filtered by location and ordered by lowest impressions), which only contains a countdown timer. The timer is set to one second and on completion, copies the key elements (sponsor banner image, name, description, website, email, telephone, location and sponsor ID link - one sponsor can have many users) to the logged in user record. It also changes a flag which hides the list on timer completion, preventing a rerun.
  2. A second timer is set to 2 seconds and on completion, shows the banner image by changing a second input which controls the conditional visibility. The image is set to show nothing if the sponsor banner image field is empty.
  3. When clicking on the banner image, a sponsor detail screen is loaded, pulling the information from the user record. The banner click also increments the original sponsor record’s impressions count, via the linked User → Sponsor relationship.

There’s quite a bit going on, so it remains to be seen how it performs on native mobile, but fingers crossed! I would have liked to be able to set the actual range of search miles on the sponsor banner row (for regional and national banners to be shown to a wider audience), however that seems to be a step too far! I can only use the sponsor location and then filter it by a default search miles value on the user record. It’ll do!!
I really appreciate your time and suggestions, thank you :slight_smile:

1 Like

Hi @Tone,

Thanks a lot for sharing the results, great that you made it work!

Best,
Victor.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.