Overview
Radar’s geofencing capabilities allow you to create custom geofences and monitor when users enter, exit, or dwell in specific locations. Geofences can be circular or polygon-shaped and include rich metadata for targeting and personalization.Understanding Geofences
Geofences are virtual boundaries that trigger events when a user crosses them. Each geofence includes:- Unique identifier: Radar ID and optional external ID
- Tag: Categorize geofences (e.g., “store”, “warehouse”, “delivery-zone”)
- Description: Human-readable name
- Geometry: Circle or polygon shape
- Metadata: Custom key-value pairs for additional context
- Operating hours: Optional hours when the geofence is active
Geofence Events
Radar generates three types of geofence events:1
Entry Events
Triggered when a user enters a geofence.Event type:
RadarEventTypeUserEnteredGeofence2
Exit Events
Triggered when a user exits a geofence.Event type:
RadarEventTypeUserExitedGeofenceExit events include a
duration property indicating how long the user was inside the geofence (in minutes).3
Dwell Events
Triggered when a user dwells in a geofence for a specified duration.Event type:
RadarEventTypeUserDwelledInGeofenceConfigure dwell duration thresholds in the Radar dashboard. Default is 5 minutes.
Searching for Geofences
You can search for nearby geofences using thesearchGeofences() method.
Search Near Current Location
Search with Filters
Filter geofences by tag, metadata, radius, and limit:Search Parameters
Geofence Properties
Access geofence properties from theRadarGeofence object:
Syncing Geofences
Enable geofence syncing to download nearby geofences to the device for improved responsiveness:Using Client Geofences
Client geofences create local iOS region monitoring around the user’s current location:Client geofences use Apple’s region monitoring service to wake the app when the user moves beyond the specified radius, improving battery efficiency.
Event Confidence
Geofence events include a confidence level indicating the likelihood that the event is accurate:Verifying Events
You can accept or reject geofence events to improve accuracy:Event verifications help Radar’s machine learning improve future event accuracy and confidence levels.
Use Cases
Store Pickup
Trigger curbside pickup notifications when customers arrive at store geofences.
Delivery Zones
Monitor when delivery drivers enter and exit delivery zones for real-time tracking.
Attendance Tracking
Track employee or student attendance based on geofence entry/exit events.
Marketing Campaigns
Send targeted messages when users enter specific geographic areas or competitor locations.
Best Practices
1
Use Tags for Organization
Organize geofences with tags (e.g., “store”, “warehouse”, “restaurant”) for easy filtering and management.
2
Leverage Metadata
Store additional context in geofence metadata (store IDs, manager contacts, operating details) for personalization.
3
Set Appropriate Radii
Use smaller radii (50-100m) for precise locations like stores. Use larger radii (500-1000m) for neighborhoods or zones.
4
Monitor Event Confidence
Check event confidence levels and handle high-confidence events differently than low-confidence ones.
5
Enable Geofence Syncing
Enable
syncGeofences for better responsiveness and reduced latency in geofence events.For more details on geofencing, visit the Radar documentation.