Type Function Return value none Revision 2017.3060 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 "18AndUnder"
, "55AndAbove"
, "18To20"
, "21To24"
, "25To34"
, or "35To54"
.
String. The user's education level. Valid options are "highSchoolOrLess"
, "collegeOrGraduate"
, or "graduateOrAbove"
.
String. The user's ethnicity. Valid options are "hispanic"
, "caucasian"
, "asian"
, "africanAmerican"
, or "other"
.
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", ethnicity = "other" })