Sharing Location Information

If your app uses Location Services and a user has granted permission to use location, the SDK will automatically send location data on its ad and bid requests. If a user does not give permission to the app to use location information, then the SDK does not have access to the location information and the rest of this section is not applicable. The SDK will not present a location permission dialog. Location data enables more relevant advertisements to reach your users.

To align with advertising standards and adhere to current regulations, the SDK does not send the exact latitude and longitude representing the user’s location to the server unless the user of the app explicitly gives permission to allow the use of location information for targeting of ads.

By default, when the location information is available from the OS, the SDK rounds the user’s latitude and longitude to a single decimal point of precision. To override the default behavior and send the precise location, the publisher must acknowledge that they have obtained explicit permission from the user by setting LocationAccessMode to ‘PRECISE’. The SDK allows the publisher to change the state back to the default at any time during the app lifecycle by setting the LocationAccessMode to ‘IMPRECISE’.

When the user does not want imprecise or precise location information to be used for advertising, the publisher can inform the SDK by setting the LocationAccessMode to DENIED. In this case, location information is not sent irrespective of other privacy settings.

It is important to note that when GDPR rules that restrict the sending of location information are in force, then neither precise nor imprecise location information will be sent.

The following table breaks down the states for Location Access Mode:

PRECISE The latitude and longitude as obtained from the OS will be sent on ad requests and used for ad targeting
IMPRECISE The latitude and longitude as obtained from the OS will each be rounded to 1 decimal place and the resulting value will be sent on ad requests and used for ad targeting. This is the default behavior.
DENIED Location information will not be sent on ad requests thus not used for ad targeting
[[YASAds sharedInstance] setLocationAccessMode:YASLocationAccessModePrecise];
YASAds.sharedInstance.locationAccessMode = YASLocationAccessMode.precise