appodeal.setSegmentFilter()

Type Function
Return value none
Revision Current Public Release (2018.3326)
Keywords ads, advertising, Appodeal, setSegmentFilter
See also appodeal.init()
appodeal.*

Overview

Important

This method is not supported by stable modular & legacy plugin versions for now. Make sure to use new modular plugin beta to get the latest and greatest.

Manual Filters allows you to group users by specific characteristics. E.g. you know the sources that directed users to your app and you want to track the statistics for such users — group them into a segment. You can read more in Appodeal Knowledge Base.

Syntax

appodeal.setSegmentFilter( options )
options (required)

Table. Table containing option values — see the next section for details.

Options Reference

The options table includes parameters for specifying user details.

customRules (required)

Number. Custom rules for users grouping.

Example

local appodeal = require( "plugin.appodeal" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Set segment filter
        appodeal.setSegmentFilter( { customRules = "YOUR CUSTOM RULES TABLE HERE" } )
    end
end

-- Initialize the Appodeal plugin
appodeal.init( adListener, { appKey = "YOUR_APP_KEY" } )