Segments and placements

Segments

Segments are used to track statistics for various user categories and to manage ads for this categories. A segment is a fraction of audience unified by restrictions: e.g. by gender, age or any other parameter known to the app and directed to Appodeal SDK. Additional ad management settings can be applied to each segment. Read more on segments in our FAQ.

Once user segments have been created, they can then be analyzed and used to configure ads.

To create new segment go here.

Manual Filters allows to group users by any available metric. E.g. you know the sources that directed users to your app and you want to track the statistics for such sources — create a segment for each source and mark each user with its source.

To create such a segment you have to give our SDK the name and value:

Appodeal.setCustomRule([AnyHashable : Any]!) 
Value can be boolean, numeric or string-based.

Example: 

Appodeal.setCustomRule(["levels_played" : 3])
If you have no segments all users will be matched to default segment.

If you have multiple segments, their order is important. Only the first segment in which rules are matched to the user will apply. All of the rest will be ignored.

Placements

Appodeal SDK allows you to tag each impression with different placement. Read more on placements in our FAQ.

To show an ad with placement, you have to call show method like this:

Appodeal.showAd(.interstitial, forPlacement: "placement", rootViewController: controller)
To check if an impression is available for a given placement, use:
Appodeal.canShowAd(.interstitial, forPlacement: "placement")
You can configure your impression logic for each placement.

If you have no placements, or call showAd with placement that do not exist, the impression will be tagged with 'default' placement and its settings will be applied.

Important!

Placement settings affect ONLY ad presentation, not loading or caching.