Skip to main content

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.

Feature Metadata

ItemDetails
Feature keygeo
Primary useDefine named geolocations for filtering and targeting
Public API surfaceGeolocation create/list/delete and IP lookup
Visibility modelApp-specific locations and global locations

Behavior Notes

  • get_locations returns 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_query hook that expands geo filters for drill queries.

Limitations

  • There is no implemented public update handler in current geo API code; use delete + create when a location must be changed.
Implementation details

Database Collections

CollectionPurpose
countly.geosStores geolocation documents (title, radius, unit, geo, address, app, deleted)
countly.appsApp existence and admin access checks during create