appodeal segments etc

There is a lack of information on the docs, so here is a question regarding Appodeal usage.

What should be the flow logic for in-game checking whether some variable is true, to show the user an Appodeal ad that checks for this var in a segment?

I know that there are segment rules and placements from Appodeal Dashboard. I also know that you have custom vars in appodeal.init() and placement usage in appodeal.show() but can’t figure out how to use them. 

Take for example this scenario: I want to have two segments in Appodeal: One with videos (networks) for older people and one with videos for younger ones. I gather this age info inside my game. I want to build a flow login inside my game that checks player age and asks from Appodeal the appropriate ad. How I do this with Corona API and Appodeal segments or placements ? 

From what I see the custom vars are only used inside appodeal.init(). But I know the age info and the appropriate segment/placement only after initiating appodeal, and when I call show() there is no custom var to use inside there. And how do I know that the specific ad for a segment rules set is indeed loaded?

Could you please give us an example with rough code ?

Thanks in advance! 

Hi @noocell,

Check out the “params > placement” key for “appodeal.show()”. I believe that’s what you’re looking for.

https://docs.coronalabs.com/plugin/appodeal/show.html#parameter-reference

Best regards,

Brent

@Brent

OK, let’s say that I make two segments in Appodeal Dashboard, the first with kiddoz video ads and the second with elder video ads, looking for placements “kids” and “elder” in the segment settings. Remember that these are two different kinds of ads.

Now in my code, I init Appodeal asking for Videos (in general). Later on, I check if a video is loaded (what kind of video?) and I ask Appodeal to show an ad for the “kiddoz” placement, as you state in your post. How do I know that the loaded video (which Appodeal is going to show) is the kiddoz one?

I mean, I would expect that the placement param should go inside load() and not inside show() !

Hi @noocell,

By default, Appodeal loads/caches ads in the background, so you should be able to just call show() with the segment. Would that meet your needs?

Brent

@Brent

Does this mean that autocaching loads a whole set of different ads (to meet the criteria of each segment with its rules) so that any request for a specific segment ad is ready to be shown? I would be surprised to hear that!

Imagine a case in which someone makes 5 segments, each one having a setting to show only a specific network. If I correctly translate your response, autocaching should load 5 videos each time the app starts! I hope this is not the case…


I checked the placement param but the thing is you cannot differentiate the networks with Placemenet settings in Appodeal Dashboard. You need to set Segment settings. Inside a segment setting you can check for “custom variables” used in the app code. My question is: I can see them being set in appodeal.init() params, but where do I use them to trigger the Segment checking? They are neither in load() nor in show().

This is a bit of a tricky situation as the Appodeal SDK requires custom rules to be set *before* it’s initialized with your AppKey.

The Appodeal support team will be able to help you more quickly with this issue. I recommend that you to contact them directly.

You can do so by logging in to the Appodeal dashboard. You’ll see a red-and-white circle in the lower-right of the screen which you can click to start a new conversation topic with them. You can refer them to this posting as well. If any changes are needed to be made on the Corona plugin side they will contact me with suggestions based on your discussions with them.

Hi @noocell,

Check out the “params > placement” key for “appodeal.show()”. I believe that’s what you’re looking for.

https://docs.coronalabs.com/plugin/appodeal/show.html#parameter-reference

Best regards,

Brent

@Brent

OK, let’s say that I make two segments in Appodeal Dashboard, the first with kiddoz video ads and the second with elder video ads, looking for placements “kids” and “elder” in the segment settings. Remember that these are two different kinds of ads.

Now in my code, I init Appodeal asking for Videos (in general). Later on, I check if a video is loaded (what kind of video?) and I ask Appodeal to show an ad for the “kiddoz” placement, as you state in your post. How do I know that the loaded video (which Appodeal is going to show) is the kiddoz one?

I mean, I would expect that the placement param should go inside load() and not inside show() !

Hi @noocell,

By default, Appodeal loads/caches ads in the background, so you should be able to just call show() with the segment. Would that meet your needs?

Brent

@Brent

Does this mean that autocaching loads a whole set of different ads (to meet the criteria of each segment with its rules) so that any request for a specific segment ad is ready to be shown? I would be surprised to hear that!

Imagine a case in which someone makes 5 segments, each one having a setting to show only a specific network. If I correctly translate your response, autocaching should load 5 videos each time the app starts! I hope this is not the case…


I checked the placement param but the thing is you cannot differentiate the networks with Placemenet settings in Appodeal Dashboard. You need to set Segment settings. Inside a segment setting you can check for “custom variables” used in the app code. My question is: I can see them being set in appodeal.init() params, but where do I use them to trigger the Segment checking? They are neither in load() nor in show().

This is a bit of a tricky situation as the Appodeal SDK requires custom rules to be set *before* it’s initialized with your AppKey.

The Appodeal support team will be able to help you more quickly with this issue. I recommend that you to contact them directly.

You can do so by logging in to the Appodeal dashboard. You’ll see a red-and-white circle in the lower-right of the screen which you can click to start a new conversation topic with them. You can refer them to this posting as well. If any changes are needed to be made on the Corona plugin side they will contact me with suggestions based on your discussions with them.