Location-based targeting
With the user's permission, you can collect the device location and build segments such as "users within X km of this point" (ADR-0025).
With the user's permission, you can collect the device location and build segments such as "users within X km of this point"
(docs/adr/0025-hms-flutter-web-catalyst-konum.md).
Principles (KVKK)
- Location is sent only while the app is in the foreground, after the operating system permission has been granted and your app
has called
Location.setShared(true). No coordinates are collected in the background. (KVKK is the Turkish data protection law.) - If optional background region monitoring is enabled, the operating system monitors the regions; no coordinates are sent to the server, only region entries and exits are reported.
- The moment of first sharing is stored as an explicit consent record (
location_consent_at). - When
Location.setShared(false)is called, the location and the consent record are deleted on the server immediately. - Coordinates are rounded to 5 decimal places (≈1 m); the SDK updates at most once every 5 minutes.
- Before the permission prompt, show the user an explanation of why the location is requested (the SDK's
requestPermissionaccepts an optional rationale text).
SDK
Pushizo.Location.requestPermission(activity, rationale = "For store offers near you")
Pushizo.Location.setShared(true)Pushizo.Location.requestPermission()
Pushizo.Location.setShared(true)await Pushizo.Location.requestPermission();
Pushizo.Location.setShared(true);Details and other platforms: Android, iOS, Flutter,
the Web SDK and the bridge READMEs. On iOS, add NSLocationWhenInUseUsageDescription to Info.plist.
Segment
Segments → New → Add condition → Location:
| Operator | Meaning |
|---|---|
| within radius | Latitude, longitude and radius (0.1–1000 km); "Use my location" fills in the browser location |
| is set | Devices that share their location |
| is not set | Devices that do not share their location |
API definition:
{ "all": [{ "field": "location", "op": "within_radius", "lat": 41.0082, "lng": 28.9784, "radius_km": 5, "days": 7 }] }days is optional: it counts only locations updated in the last N days. Users who do not share their location never
match this condition.
Region entry and exit
To start journeys from the shared location, see the Geofences page.
Server side
The location arrives with the SDK's subscription update (PATCH /sdk/v1/apps/{appId}/subscriptions/{id},
location: { lat, lng, accuracy_m } | null). In the dashboard, the subscription row on the user detail page shows the approximate location and
update time; public API subscription responses include the location field.
iOS Live Activities
Live Activities show live content on the lock screen and in the Dynamic Island: order tracking, delivery time, match scores, journey status. With Pushizo, you start, update and end activities from the server…
Geofences
Start journeys when users who share their location enter or leave an area you define. Decision record: ADR-0064. You need to enable location sharing first.