personaly.setUserDetails()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, Persona.ly, setUserDetails
See also personaly.init()
personaly.*

Overview

Sets user details for the user ID given during initialization via personaly.init(). Providing these details may help improve revenue with offers targeted for the user.

Syntax

personaly.setUserDetails( 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.

gender (optional)

String. The user’s gender. Valid values include "male" and "female".

birthday (optional)

String. The user’s birthday. Date must be sepcified in YYYY-MM-DD format.

Example

local personaly = require( "plugin.personaly" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        print( event.provider )
    end
end

-- Initialize the Persona.ly plugin
personaly.init( adListener, { appHash="YOUR_APP_HASH", userId="UNIQUE_USER_ID" } )

-- Set user details
personaly.setUserDetails( { gender="female", birthday="1990-01-30" } )