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,
PMPrefetchRequest and so on.
The following sections describe the most commonly used targeting information.
Location has two different usage options:
PubMatic Android SDK enables automatic location detection by default. When available, PubMatic Android 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.
- Assign a valid
Locationobject using the
setLocation()method of the ad request.
PubMatic recommends that you keep automatic location detection enabled in the SDK to increase monetization.
ACCESS_FINE_LOCATIONpermission in your app’s
AndroidManifest.xmlfile. See Adding Permissions to Manifest file for details. If this permission is not included in your app's
AndroidManifest.xmlfile, then PubMatic Android SDK won't retrieve the user location automatically.
The SDK has the ability to detect Android Advertising ID (AID) of the device and pass it in the ad request. AID is enabled by default. You can call setAndroidAidEnabled(true/false) to toggle the AID. In then event AID is unavailable, the Android ID substitutes for the AID.
PubMatic Android SDK also lets you pass hashed values of udid (AID, or Android ID when AID is not available) using SHA1 and MD5 hashing techniques.
Pass Extra Targeting Parameters
You can pass two types of additional targeting information in the ad request for greater monetization.
Pass User information on
Pass application information using custom parameters in an instance of