Passing extra targeting information increases leads to demand partners, who usually bid higher for such impressions. While it's not mandatory to pass extra targeting information in ad requests, PubMatic highly recommends passing this information to increase monetization.
You can set additional targeting information (in addition to the mandatory parameters), on any
PMAdRequest instance; for example,
PMNativeAdRequest, and so on.
The following sections describe the most commonly used targeting information.
Location has two different usage options:
PubMatic iOS SDK enables automatic location detection by default. When available, PubMatic iOS SDK sends device location in the ad request.
You can also explicitly enable/disable auto-location detection for PubMatic iOS SDK using the
+setLocationDetectionEnabled: class method from
To set location manually:
- Disable auto-location detection.
locationproperty of ad request.
PubMatic recommends that you keep automatic location detection enabled in the SDK to increase monetization.
NSLocationWhenInUseUsageDescriptionkey in your app’s
Info.plistfile and provide a purpose string for this key. If this key is not included in your app's
Info.plistfile, the SDK won't retrieve the user location automatically. See Using Description Keys for details.
PubMatic iOS SDK can detect the advertising ID of the host iOS device and pass it in an ad request. PubMatic iOS SDK sends Advertising ID (IDFA) by default in every ad request. Disable the use of IDFA by setting the
isIDFAEnabled property of an ad request to
NO. PubMatic SDK also honors the user's preference to Limit Ad Tracking. If user has opted out of targeted ads by enabling Limit Ad Tracking on their iOS device, PubMatic iOS SDK will not send the IDFA.The Vendor ID (IDFV) is used instead of Advertising ID (IDFA) for non-targeting purposes (for example, frequency capping), if the SDK is not able to retrieve the advertising ID.
Securing Device IDs Using a Hash
You can secure the advertising ID (IDFA/IDFV, whichever is being used, based on
isIDFAEnabled), using a SHA1 or MD5 hash:
Other Targeting Information
Pass additional targeting information in the ad request for increased monetization; for example, include extra information in an Ad Request instance as shown below:
Passing Custom Key-Values
All of the SDK's ad request classes (for example,
PMBannerAdRequest), provide an API for setting custom key value parameters.