Location Targeting - API Documentation
Enterprise
This feature is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Overview
Location Targeting lets you define reusable geographic areas (center point + radius) and use them in Countly segmentation and filtering workflows.
Quick Links
Feature Metadata
| Item | Details |
|---|---|
| Feature key | geo |
| Primary use | Define named geolocations for filtering and targeting |
| Public API surface | Geolocation create/list/delete and IP lookup |
| Visibility model | App-specific locations and global locations |
Behavior Notes
get_locationsreturns app-specific locations first (sorted by title), then global locations.- Global (non-app-specific) locations can be created and deleted only by global admins.
- The feature includes an internal
/drill/preprocess_queryhook that expands geo filters for drill queries.
Limitations
- There is no implemented public update handler in current
geoAPI code; use delete + create when a location must be changed.
Implementation details
Database Collections
| Collection | Purpose |
|---|---|
countly.geos | Stores geolocation documents (title, radius, unit, geo, address, app, deleted) |
countly.apps | App existence and admin access checks during create |