appodeal.setSegmentFilter()

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

Overview

Important

This method is not supported by the legacy plugin. Make sure to use new modular plugin or beta to get the latest and greatest features.

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" } )