applovinMax.setUserDetails()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, AppLovin, setUserDetails, Applovin Max
See also applovin.init()
applovinMax.load()
applovinMax.isLoaded()
applovinMax.*

Overview

Sets the user details to be passed to AppLovin for server-side callbacks.

Note

This function is completely optional and only applies if you are using AppLovin server-side callbacks. You can find out more information on server-side callbacks at the AppLovin developer portal.

Syntax

applovinMax.setUserDetails( params )
params (required)

Table. Table containing AppLovin user detail values — see the next section for details.

Parameter Reference

The params table includes parameters for the AppLovin user details.

userId (optional)

String. The user ID you wish to set for the current user in your app. This can be any non-empty string value, for example user123.

Example

local applovinMax = require( "plugin.applovinMax" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Set the user details
        applovinMax.setUserDetails( { userId="user123" } )
    end
end

-- Initialize the AppLovin plugin
applovinMax.init( adListener )