Skip to main content
Version: 3.3.2

Segments and Placements

Segments

Segments are used to track statistics for various user categories and manage ads for this categories. A segment is a fraction of audience outlined based on certain parameters: e.g. gender, age or any other parameters known to the app and passed 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 a new segment go here.

info

If you have no segments, all users will be assigned to default segment.

If you have multiple segments, their order is important. Only the first segment related to the given user will apply. All of the rest will be ignored.


Manual Filters

Manual Filters allow 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 the source they came from.

To create such a segment, you have to set its name and value:

Appodeal.setCustomFilter(name: String, value: Any?)

Value can be boolean, numeric or string-based.

Example:

Appodeal.setCustomFilter(name = "levels_played", value = 3)

Bought In-Apps and In-Apps Amount Filters

Bought In-Apps allows to group users by the fact of purchasing in-apps. This will help you adjust the ads for such users or turn them off if needed.

In-Apps Amount filter allows you to group users who've made a particular amount of in-app purchases.

Please submit the purchase info via Appodeal SDK to make these settings work correctly.

Appodeal.trackInAppPurchase(context = context, amount = 5.0, currency = "USD")

If you have no segments, all users will be assigned to default segment.

If you have multiple segments, their order is important. Only the first segment related to the given 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:

// for Interstitial, Rewarded Video, Banner and MREC
Appodeal.show(activity = activity, adTypes = adTypes, placementName = "placement")

// for Native Ad
val nativeAd: NativeAd = ...
val nativeAdView: NativeAdView = ...
nativeAdView.registerView(nativeAd = nativeAd, placementName = "placement")

To check if an impression is available for a given placement, use:

// for Interstitial, Rewarded Video, Banner and MREC
Appodeal.canShow(adTypes = adTypes, placementName = "placement")

// for Native Ad
nativeAd.canShow(placementName = "placement")

You can configure your impression logic for each placement.

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

Important!

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