With location data continuing to gain traction for advertising in 2015, it's less about actually enriching traffic with location data, but more about enriching it with accurate location data. When it comes to user data driving revenue, we've seen a general eCPM growth of +88% (compared to non-enriched data) when all user data is present, with eCPM uplifts of up to 212% for highly accurate location data-enriched traffic (depending on the level of accuracy).
Want to know how to up your location accuracy game? Read on & learn more:
What types of location data are generally available?
- OS Location Information: Using a phone's "Location Services" offers a mix of GPS, cell tower and WiFi information; GPS is the most accurate, and if no GPS is available, it will go to the next best available source.
- IP Address: The device's IP address also offers location data (at least country and often city).
- User Profile: User account information can also contain location information; however, that data is static and may not correlate with the user's actual current location.
What determines the quality (and revenue potential) of location data?
- Precision: As mentioned, a device's Location Services feature delivers the most precise data; in general, only GPS data can be leveraged for hyper-local targeting.
- Recency: Recency can change the value of location data; at some point, a less precise but recent signal may be of higher value than a precise but old signal.
- Blocking: Especially GPS and cell network data can be blocked by a user, e.g. if a device's Location Services are disabled, or if a user disabled Location Services for your specific application.
Another thing to consider with location data (and another potential reason for users to deactivate sending that data) is the impact on battery life, which may be substantial if refreshed too frequently.
Here are some implementation tips on how to leverage Location Services on iOS, Android and Mobile Web:
(full resources here)
To get a user's location on iOS, you must link your app to CoreLocation.framework in your Xcode project. To access the classes and headers of the framework, include an #import statement at the top of any relevant source files.
Apple offers three options to assess a user's location:
- Significant-change location service (lower battery burden)
- Standard location service (for precise data)
- Region monitoring (for pre-defined locations)
You can enable location support from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the location value in your app’s Info.plist file.)
Enabling this mode does not prevent the system from suspending the app, but it does tell the system that it should wake up the app whenever there is new location data to deliver. Thus, this key effectively lets the app run in the background to process location updates whenever they occur. Keep in mind that continuous background operation can significantly drain the device’s battery.
More on that here.
App Store Approval
Apple encourages apps to use Location Services only as much as is needed, and its App Store review guidelines require all apps that use location services to “notify and obtain user consent before collecting, transmitting, or using location data.” If you’re using the API correctly, Apple will pop up an appropriate dialog box the first time a user tries to use Location Services.
No Location Service
Location Services may not be available due to:
- The user having disabled Location Services on the device
- The user having blocked your app from receiving Location Service
- The device being in airplane mode or unable to power up the location hardware
(full resources here)
There are two APIs available for location tracking on Android:
- AOSP (open source) location package
- Google Play Services Location Client.
Using Google Play Services for location tracking should generally be more accurate while minimizing power consumption, but will require you to include the Google Play Services SDK with your application. Be sure to call the setFastestInterval method of your LocationRequest with a low value. This will allow your app to take advantage of other apps that may be pulling location.
You've got the following options to set a priority for a location request:
- priority_high_accuracy (most accurate location)
- priority_balanced_power_accuracy (accurate location while minimizing power consumption)
- priority_no_power (checks for valid and non-stale location values from other sources for re-use first)
Request access to the access_fine_location permission to leverage the network_provider and gps_provider methods associated with the LocationManager class (this permission request will have to be implicitly approved by your users when they install your app via the Play Store).
AOSP Android.Location API
If you expect to deploy your application on non-Google Android devices (like the Amazon Kindle Fire), then you'll need to use the AOSP android.location APIs. Documentation on pulling user location using the android.location package can be found here.
You should only use location available via the network_provider and gps_provider methods unless your app is already getting location data very regularly for other purposes (e.g. a navigation application or location-based game), in which case you can also use the passive_provider method.
Mobile Websites (HTML5)
For maximum accuracy, you can use the watchPosition() method - but that’ll drain your users' device battery very quickly. In most cases, we suggest to use the getCurrentPosition() function to fetch data as needed.
The position object includes a very important property: coords.accuracy. If the accuracy is off by any more than 100 meters, it can't be useful for the purposes of location-based ad targeting (the ideal accuracy would be 30 meters or less).
The getCurrentPosition() method accepts the object PositionOptions as an argument; it’s recommended you set the enableHighAccuracy property to true - It’s a little bit slower in fetching location, but worth it.
The PositionOptions object also has support for a maximumAge - the sweet spot between preserving battery life and retaining data freshness is at about 60,000 milliseconds.