applovin.setUserDetails()

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

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

applovin.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 applovin = require( "plugin.applovin" )

local function adListener( event )

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

-- Initialize the AppLovin plugin
applovin.init( adListener, { sdkKey="YOUR_SDK_KEY" } )