Type Function Return value none Revision Release 2024.3703 Keywords ads, advertising, Pollfish, setUserDetails See also pollfish.init() pollfish.*
Sets user details. Providing these details may help improve revenue with offers targeted for the user.
pollfish.setUserDetails( options )
Table. Table containing option values — see the next section for details.
The options
table includes parameters for specifying user details.
String. User's gender. Valid values include "male"
, "female"
, and "other"
.
String. User's Facebook ID.
String. User's Twitter ID.
Table. User's location. The location
table includes the following parameters for specifying user location:
longitude
— Optional number representing longitude.latitude
— Optional number representing latitude.horizontalAccuracy
— Optional number representing horizontal accuracy.Note that this table is only used for iOS. For Android you can get automatic location retrieval by setting the "android.permission.ACCESS_FINE_LOCATION"
and "android.permission.ACCESS_COARSE_LOCATION"
permissions.
String. A unique ID to identify a user. This ID is also passed through
local pollfish = require( "plugin.pollfish" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Pollfish plugin pollfish.init( adListener, { apiKey="YOUR_API_KEY" } ) -- Set user details pollfish.setUserDetails( { gender="female" } )