Skip to main content
Represents a change in user state. Events are generated when a user enters or exits a geofence, place, region, or beacon, or when trip status changes.

Properties

_id
String
required
The Radar ID of the event.
createdAt
Date
required
The datetime when the event occurred on the device.
actualCreatedAt
Date
required
The datetime when the event was created on the server.
live
Bool
required
A boolean indicating whether the event was generated with your live API key.
type
RadarEventType
required
The type of the event. See Event Types for possible values.
conversionName
String
The name of the conversion event. This will only be set if the type is conversion.
geofence
RadarGeofence
The geofence for which the event was generated. May be nil for non-geofence events.
place
RadarPlace
The place for which the event was generated. May be nil for non-place events.
region
RadarRegion
The region for which the event was generated. May be nil for non-region events.
beacon
RadarBeacon
The beacon for which the event was generated. May be nil for non-beacon events.
trip
RadarTrip
The trip for which the event was generated. May be nil for non-trip events.
fraud
RadarFraud
The fraud checks for which the event was generated. May be nil for non-fraud events.
alternatePlaces
[RadarPlace]
For place entry events, alternate place candidates. May be nil for non-place events.
verifiedPlace
RadarPlace
For accepted place entry events, the verified place. May be nil for non-place events or unverified events.
verification
RadarEventVerification
required
The verification of the event. See Event Verification for possible values.
confidence
RadarEventConfidence
required
The confidence level of the event. See Event Confidence for possible values.
duration
Float
required
The duration between entry and exit events, in minutes, for exit events. 0 for entry events.
location
CLLocation
required
The location of the event.
replayed
Bool
required
A boolean indicating whether the event came from a replayed location.
metadata
[String: Any]
required
The metadata of the event. Present on conversion events only.

Event Types

The RadarEventType enum defines the types of events that can be generated:
unknown
RadarEventType
Unknown event type.
conversion
RadarEventType
A conversion type, created by calling Radar.sendEvent(). The type value will be assigned to the conversionName property.
userEnteredGeofence
RadarEventType
user.entered_geofence - User entered a geofence.
userExitedGeofence
RadarEventType
user.exited_geofence - User exited a geofence.
userEnteredPlace
RadarEventType
user.entered_place - User entered a place.
userExitedPlace
RadarEventType
user.exited_place - User exited a place.
userNearbyPlaceChain
RadarEventType
user.nearby_place_chain - User is near a place chain.
userEnteredRegionCountry
RadarEventType
user.entered_region_country - User entered a country.
userExitedRegionCountry
RadarEventType
user.exited_region_country - User exited a country.
userEnteredRegionState
RadarEventType
user.entered_region_state - User entered a state.
userExitedRegionState
RadarEventType
user.exited_region_state - User exited a state.
userEnteredRegionDMA
RadarEventType
user.entered_region_dma - User entered a designated market area (DMA).
userExitedRegionDMA
RadarEventType
user.exited_region_dma - User exited a DMA.
userEnteredRegionPostalCode
RadarEventType
user.entered_region_postal_code - User entered a postal code.
userExitedRegionPostalCode
RadarEventType
user.exited_region_postal_code - User exited a postal code.
userDwelledInGeofence
RadarEventType
user.dwelled_in_geofence - User dwelled in a geofence.
userStartedTrip
RadarEventType
user.started_trip - User started a trip.
userUpdatedTrip
RadarEventType
user.updated_trip - User’s trip was updated.
userApproachingTripDestination
RadarEventType
user.approaching_trip_destination - User is approaching the trip destination.
userArrivedAtTripDestination
RadarEventType
user.arrived_at_trip_destination - User arrived at the trip destination.
userArrivedAtWrongTripDestination
RadarEventType
user.arrived_at_wrong_trip_destination - User arrived at the wrong trip destination.
userStoppedTrip
RadarEventType
user.stopped_trip - User stopped a trip.
userFiredTripOrders
RadarEventType
user.fired_trip_orders - User fired trip orders.
userEnteredBeacon
RadarEventType
user.entered_beacon - User entered a beacon region.
userExitedBeacon
RadarEventType
user.exited_beacon - User exited a beacon region.
userFailedFraud
RadarEventType
user.failed_fraud - User failed fraud detection checks.

Event Confidence

The RadarEventConfidence enum defines the confidence levels for events:
none
RadarEventConfidence
Unknown confidence (0).
low
RadarEventConfidence
Low confidence (1).
medium
RadarEventConfidence
Medium confidence (2).
high
RadarEventConfidence
High confidence (3).

Event Verification

The RadarEventVerification enum defines the verification types for events:
accept
RadarEventVerification
Accept event (1).
unverify
RadarEventVerification
Unverify event (0).
reject
RadarEventVerification
Reject event (-1).

Methods

stringForType

class func string(for type: RadarEventType) -> String?
+ (NSString *_Nullable)stringForType:(RadarEventType)type;
Converts a RadarEventType enum value to its string representation.
type
RadarEventType
required
The event type to convert.
Returns: The string representation of the event type, or nil if unknown.

dictionaryValue

func dictionaryValue() -> [AnyHashable: Any]
- (NSDictionary *_Nonnull)dictionaryValue;
Converts the event to a dictionary representation. Returns: A dictionary representation of the event.

arrayForEvents

class func array(for events: [RadarEvent]?) -> [[AnyHashable: Any]]?
+ (NSArray<NSDictionary *> *_Nullable)arrayForEvents:(NSArray<RadarEvent *> *_Nullable)events;
Converts an array of events to an array of dictionary representations.
events
[RadarEvent]
The array of events to convert.
Returns: An array of dictionary representations, or nil if the input is nil.

See Also

Build docs developers (and LLMs) love