Page tree


Inherits fromPMBaseAdRequest : NSObject
Declared inPMAdRequest.h

Overview


Abstract class for PubMatic (SSP) ad requests (for example, PMBannerAdRequest, PMNativeAdRequest, and so on).


Warning: Do not call any ads using a direct instance of PMAdRequest.

Tasks


Initialization method

User Information

Properties


IABCategory

IAB category for the iOS app.

@property (nonatomic, strong) NSString *IABCategory

Declared In

PMAdRequest.h

aid

iOS app’s ID.

@property (nonatomic, strong) NSString *aid

Declared In

PMAdRequest.h

appCategory

App's primary category as displayed on storeurl page in the iOS App Store.

@property (nonatomic, strong) NSString *appCategory

Declared In

PMAdRequest.h

appDomain

The domain of the mobile app.

@property (nonatomic, strong) NSString *appDomain

Declared In

PMAdRequest.h

applicationPaid

Indicates whether the app is free or paid.

@property (nonatomic, assign) PMBOOL applicationPaid

Discussion

Possible values are:

  • PMBOOLNo = Free version.
  • PMBOOLYes = Paid version.

Declared In

PMAdRequest.h

birthYear

User's year of birth as a 4-digit integer; for example, adRequest.birthYear = @"1988";

@property (nonatomic, strong) NSString *birthYear

Declared In

PMAdRequest.h

coppa

Indicates whether the visitor is COPPA-specific or not.

@property (nonatomic, assign) PMBOOL coppa

Discussion

For COPPA (Children’s Online Privacy Protection Act) compliance, if the visitor’s age is below 13, then such visitors should not be served targeted ads.

Discussion

Possible options are:

  • PMBOOLNo = Indicates that the visitor is not COPPA-specific and can be served targeted ads.
  • PMBOOLYes = Indicates that the visitor is COPPA-specific and should be served only COPPA-compliant ads.

Declared In

PMAdRequest.h

ethnicity

The user’s ethnicity may help deliver more relevant ads. Code of ethnicity.

@property (nonatomic, assign) PMEthnicity ethnicity

Discussion

Possible values are:

  • PMEthnicityHispanic
  • PMEthnicityAfricanAmerican
  • PMEthnicityCaucasian
  • PMEthnicityAsianAmerican
  • PMEthnicityOther

See Also

Declared In

PMAdRequest.h

gender

Indicates the user's gender identity.

@property (nonatomic, assign) PMGender gender

Discussion

Possible values are:

  • PMGenderOther
  • PMGenderMale
  • PMGenderFemale

See Also

Declared In

PMAdRequest.h

isIDFAEnabled

Indicates whether the Advertisment ID should be sent in the request.

@property (nonatomic, assign) BOOL isIDFAEnabled

Discussion

Possible values are:

  • YES = IDFA will be sent in the request (default).
  • NO = Vendor ID will be sent in the request instead of the IDFA.

Declared In

PMAdRequest.h

locationSource

The user’s location source may be useful in delivering geographically relevant ads. If location is provided by the app's user, set this property as PMLocSourceUserProvided. The default value of locationSource is PMLocSourceUnknown.

@property (nonatomic, assign) PMLocSource locationSource

Discussion

Possible options are:

  • PMLocSourceUnknown (default)
  • PMLocSourceGPS
  • PMLocSourceIPAddress
  • PMLocSourceUserProvided

See Also

Declared In

PMAdRequest.h

pmZoneId

This parameter is used to pass a zone ID for reporting.

@property (nonatomic, strong) NSString *pmZoneId

Declared In

PMAdRequest.h

publisherId

Holds the ID of the publisher. Get this value from the pubId parameter in the PubMatic ad tag.

@property (nonatomic, readonly, strong) NSString *publisherId

Declared In

PMAdRequest.h

state

The user’s state may help deliver geographically relevant ads.

@property (nonatomic, strong) NSString *state

Declared In

PMAdRequest.h

storeURL

The app's on iOS App Store URL.

@property (nonatomic, strong) NSString *storeURL

Declared In

PMAdRequest.h

userIncome

User income, if the user has provided it, may help target more relevant ads.

@property (nonatomic, strong) NSString *userIncome

Declared In

PMAdRequest.h

Instance Methods


initWithPublisherId:siteId:adId:

Initialize Ad request with Publisher credentials; that is, Publisher Id, Site Id, Ad Id.

- (id)initWithPublisherId:(NSString *)pubId siteId:(NSString *)siteId adId:(NSString *)adId

Parameters

pubId

ID of the publisher. Get this value from the pubId parameter in the PubMatic ad tag.

siteId

ID of the publisher’s web site. A publisher may have multiple sites. Get this value from the siteId parameter in the PubMatic ad tag.

adId

ID of the ad’s placement. A site may have multiple ad placements or positions, which may have the same or different ad sizes. adId is the unique identifier for such an ad placement; get this value from the adId parameter in the PubMatic ad tag.

Return Value

Initialized ad request from concrete class.

Declared In

PMAdRequest.h

setCustomParam:forKey:

Adds custon key-value parameters in the ad request.

- (void)setCustomParam:(NSString *)paramValue forKey:(NSString *)paramKey

Parameters

paramValue

Value of custom parameter.

paramKey

Parameter name of custom paramter.

Discussion

Adds custon key-value parameters in ad request.

Declared In

PMAdRequest.h


⇧ Top