Type Function Return value none Revision Release 2022.3683 Keywords ads, advertising, InMobi, setUserDetails See also inMobi.load() inMobi.*
Allows you to set
inMobi.setUserDetails( params )
Table. Table containing InMobi user information — see the next section for details.
The params
table can include the following
String. The user's gender. Valid options are "male"
or "female"
.
Table. Table of strings indicating the user's interests. You can supply any or all of the following strings: "Business"
, "Tech"
, "Travel"
, "Shopping"
, "Entertainment"
, "Fashion"
, "Fitness"
, "Foodie"
, "Gamer"
, "Jobs"
, or "Sports"
. You must supply at least one value for this parameter to apply.
String. The area code of the user's phone number. For instance, the Republic of Ireland's area code is "353"
.
String. The user's post/postal code.
Number. The user's birth year, for instance 1986
.
Number. The user's age, for instance 30
.
String. The user's age group. Valid options are "under18"
, "18to24"
, "25to34"
, "35to44"
, "45to54"
, "55to65"
, or "above65"
.
String. The user's education level. Valid options are "highSchoolOrLess"
, "collegeOrGraduate"
, or "graduateOrAbove"
.
local inMobi = require( "plugin.inMobi" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) end end -- Initialize the InMobi plugin inMobi.init( adListener, { accountId="YOUR_ACCOUNT_ID", logLevel="debug" } ) -- Set the user details inMobi.setUserDetails( { gender = "male", userInterests = { "Business", "Tech" }, postCode = "K1A0B1", ageGroup = "25to34", education = "collegeOrGraduate" })