Batch offers many options related to geolocation to segment your user base. Here is a short description of the targeting options you will find in the campaign creation form:
IP geolocation: Using the "City" attribute
The "City" attribute allows you to target your users based on the city Batch guessed for your users using IP based geolocation. Data is refreshed every time your users open your app or visit your website.
The accuracy of IP based geolocation varies depending on the network connection of your users. The detection tends to be more accurate if users are connected to a Wi-Fi network. You can test the accuracy of the detection by checking the value Batch has on your install using the debug tool.
The "City" attribute is available for mobile and web integrations.
GPS location: Using the "Last location" attribute
The last location attribute allows you to send contextual push notifications to users who have been detected in a specific area using their GPS location. All you have to do is to type an address and adjust the size of the targeted area (in meters). Data is refreshed every time your users open your app.
The "Last location" is only available for mobile integrations.
🚧 Important note
Do not request GPS location in your app to track it exclusively with Batch. The geolocation authorization needs to be asked for a legitimate purpose, related to a feature of your app (e.g. store locator, route calculation, etc). For the last location attribute to be operational, you need to share the GPS location collected by the app to Batch using the native methods of the SDK (iOS / Android).
Using a custom attribute or tag collection
In addition to the data Batch collects natively, you can send additional user properties to Batch.
If your users can select one or many location options in your app, you can assign a custom attribute (e.g. favorite_store) or a tag collection (e.g. favorite_regions) to your users.