user.entered_geofence
user.exited_geofence
user.dwelled_in_geofence
Radar.trackOnce()
or Radar.startTracking()
, depending on your use case. Radar will generate an entry event on the first location update inside of a geofence.
store
), external ID (an external ID for the geofence that maps to your internal database, e.g., 123
), and description (a display name for the geofence, e.g., Store #123
).
Geofences should be uniquely referenced by tag and external ID, assigned by you when a geofence is created. To disable or update metadata for a geofence, re-import the geofence with the same tag and external ID.
description
(string, required): A description for the geofence.type
(string, required): The type of geofence geometry. polygon
, circle
, and isochrone
are supported.tag
(string, required): A group for the geofence.externalId
(string, required): An external ID for the geofence that maps to your internal database.coordinates
(array, required if address
and placeId
are not included): An array or JSON string representing a center for type circle
or a destination for type isochrone
in the format [longitude,latitude]
. A two-dimensional array or JSON string representing a closed ring of between 4 and 2,000 coordinates in the format [[longitude0, latitude0],[longitude1,latitude1],[longitude2,latitude2],...,[longitude0,latitude0]]
for type polygon
. Note that longitude comes before latitude, a GeoJSON convention.address
(string, required if coordinates
and placeId
are not included): An address to search for, and if found, will represent the center for type circle
or isochrone
. If address
and coordinates
are both provided, they must be nearby, and coordinates
will take precedent. Ignored for type polygon
.radius
(number, required for type circle
and isochrone
): The radius in meters for type circle
, a number between 10
and 10000
. The travel duration in minutes for type isochrone
. Ignored for type polygon
.mode
(required for type isochrone
): the travel mode for type isochrone
.enabled
(boolean, optional): If true
, the geofence will generate events. If false
, the geofence will not generate events. Defaults to true
.metadata
(dictionary, optional): An optional set of custom key-value pairs for the geofence. A dictionary or JSON string with up to 16 keys and values of type string, boolean, or number. Cannot be used with metadata.{key} columns.
metadata.{key}
(string, optional): Instead of converting metadata
to stringified JSON, use columns of this format to add a key-value pairs to metadata
. For example, the column header metadata.pickup-mode
with a value of "drive-thru"
will resolve to { pickup-mode: "drive-thru" }
. Avoid using spaces and commas for keys. Cannot be used with the metadata column.
operatingHours
(dictionary, optional): An optional set of key-value pairs restricting the operating hours of the geofence. Each key is a day of the week (e.g., Sunday
) or the three letter abbreviation of the day (e.g., Sun
), case insensitive. Each value is a list of pairs, where a pair indicates one opening and closing time for that day. For example, a restaurant only open for lunch and dinner on Sundays would be { Sunday: [["11:00", "14:00"], ["19:00", "22:00"]] }
. Accepted time formats include h:mm aa
(e.g., 12:45 AM
) and HH:mm
(e.g., 00:45
). If neither operatingHours
nor operatingHours.{day}
is provided, the geofence will always be open. Cannot be used with operatingHours.{day} columns.
operatingHours.{day}
(string, optional): Instead of converting operatingHours
to stringified JSON, use columns of this format to add a key-value pairs to operatingHours
. For example, the column header operatingHours.sunday
(or operatingHours.sun
) with a value of "[["11:00", "14:00"], ["19:00", "22:00"]]"
will resolve to { Sunday: [["11:00", "14:00"], ["19:00", "22:00"]] }
. If neither operatingHours
nor operatingHours.{day}
is provided, the geofence will always be open. Cannot be used with the operatingHours column.
stopDetection
(boolean, optional): The stop detection setting for the geofence. Overrides the project-level stop detection setting.disableAfter
(datetime, optional): Use to create temporary geofences. If set, the geofence will be disabled after the specified datetime. disableAfter
operates independently of operatingHours
. A date or valid ISO date string.deleteAfter
(datetime, optional): Use to create temporary geofences. If set, the geofence will be deleted after the specified datetime. A date or valid ISO date string.userId
(string, optional): An optional user restriction for the geofence. If set, the geofence will only generate events for the specified user. If not set, the geofence will generate events for all users. Deprecated.userIds
(string, optional): An optional user restriction for the geofence. A string of comma-separated user IDs. If set, the geofence will only generate events for the specified users. If not set, the geofence will generate events for all users.ip
(string, optional): An optional IP address restriction for the geofence. A string of comma-separated IP address ranges, each of which could be a single IP (8.8.8.8
), wildcard notation (8.8.8.*
), or CIDR notation (8.8.8.8/24
). If set, the geofence will only generate events for requests from the specified IP address. If not set, the geofence will generate events for all requests.dwellThreshold
(number, optional): An optional field to trigger dwell events. If set and user.dwelled_in_geofence
is enabled in settings, an event is triggered when a user dwells in the geofence longer than the threshold (in minutes). For example, a value of 10
would result in a dwell event on the next track call after a user has occupied a geofence for 10 minutes.placeId
(string, required if coordinates
and address
are not included): For place matching, an optional _id
of the Radar place to match to the geofence. If a place was matched, the geometry of the place will override the geometry of the geofence./api/v1/geofences
, or upsert a geofence based on tag and external ID via PUT /api/v1/geofences/:tag/:externalId
.
For example, to upsert a geofence representing a store via the API:
GetObject
permissions for the specified S3 bucket and objects.1
(low) to 3
(high). Confidence is a function of the accuracy of the location reported by the device and the geometry of the geofence.
Confidence will be high when the user, taking into account the accuracy of the location reported by the device, is completely inside the geofence. Confidence will be medium when the user is mostly inside the geofence. Confidence will be low when the user is only partially inside the geofence.
stopped
is true
based on tracking options or when foreground
is true
).
You can enable this setting at a project level on the Settings page, or at a geofence level when you create geofences.
currentlyOperating
to all geofence event payloads.
Radar can also restrict geofence events from being generated outside of operating hours. Restrict event generation to only operating hours at the project level on the Settings page.
Operating hours can be set on individual geofences via CSV import, the API, or in the Advanced section of the geofence create and edit pages.
user.dwelled_in_geofence
is enabled, Radar can trigger dwell events after a device remains inside of a geofence boundary for more than a specific threshold. Radar will generate a dwell event after the first location reported by the device beyond the specified threshold.
You can enable this event at the project level on the Settings page.