Segment targeting

AppLovin MAX SDK version 12.6.0 introduces a privacy-safe way to target waterfalls. The APIs introduced in this version target a generic key-value numeric pairing. You are responsible for mapping the segment key and the applicable value(s) that represent the users you target.

For example, you could establish segments that represent the genres that interest a user. You could represent these segments with the key number 849.

Genre values might include “horror”, “thriller”, and “romance”. You could represent these by the values of 1, 2, and 3 respectively.

The following code shows how you would add a user to the horror and romance genre segments, if you defined your keys and values in that way:

val initConfig = AppLovinSdkInitializationConfiguration.builder( "«SDK-key»" )
  .setMediationProvider( AppLovinMediationProvider.MAX )
  .setSegmentCollection( MaxSegmentCollection.builder()
                           .addSegment( new MaxSegment( 849, Arrays.asList( 1, 3 ) ) )
                           .build() )
  .build();
⋮
AppLovinSdk.getInstance( this ).initialize( initConfig, sdkConfig -> {
⋮

For an example of how you can use segment targeting, see SDK integration guides > Platform > Overview > Data and keyword passing.

You can either choose not to target by segment (Do Not Enable) or you can choose to target by segment (Enable) and then type in a subset of those numeric mappings that your app passes to MAX, as «segment»:«value» pairs that conform to the following rules:

  • You must put a plus (to indicate inclusion) or minus (to indicate exclusion) in front of each segment.
  • To negatively target a property value, put a - in front of the segment (for example, -849:2 targets those devices for which the segment 849 does not have the value 2).
  • To target a set of values for one segment, pass each value with the segment individually. The following example matches campaigns for which the value of the 849 segment is 1, 2, or 3: +849:1, +849:2, +849:3
  • There is no way to target a range of values (other than by targeting each value in the range individually, or negatively targeting each value outside the range).
  • The comma in comma-separated values functions as an ∨ (or) operator. A new line functions as an ∧ (and) operator. So, for example,
    +849:1,+850:2
    +849:1,+851:3
    
    means [( §849≡1 ) ∨ ( §850≡2 )] ∧ [( §849≡1 ) ∨ ( §851≡3 )].
  • The minimum segment value is 0; the maximum is 32000.

search