Skip to main content

Segment

Radar can send events and user traits to Segment as a source. Segment can send those events and user traits to your warehouse and to hundreds of destinations.

Use the Segment integration to forward location events and user context to any destinations or to build location-based user segments with Personas.

Configuration#

In Segment, add Radar as a source and copy your write key.

Then, on the Radar Integrations page under Segment Source, set Enabled to Yes and paste your write key. Note that you can set separate write keys for the Test and Live environments.

Whenever events are generated, Radar will call track and identify to send events and user traits to Segment.

By default, Radar userId maps to Segment userId for logged in users, and Radar deviceId maps to Segment anonymousId for logged out users. However, you can specify custom mappings by setting Radar metadata.segmentUserId or metadata.segmentAnonymousId. For example, on iOS:

// track logged out users with custom anonymousId mapping (not required if using default mapping)Radar.setMetadata(["segmentAnonymousId": anonymousId])
// track logged in users with custom userId mapping (not required if using default mapping)Radar.setMetadata(["segmentUserId": userId])

User mapping#

Note that Radar uses the special string "(null)" to represent null user trait values.

Radar User FieldSegment User TraitTypeExample ValueContext Type
metadata.segmentUserId or userIduserIdstring"1"
metadata.segmentAnonymousId or deviceIdanonymousIdstring"10974a2ee035770b9"
_idradar_idstring"5b2c0906f5874b001aecfd8d"
location.coordinates[1]radar_location_latitudenumber39.525665
location.coordinates[0]radar_location_longitudenumber-76.350663
locationAuthorizationradar_location_authorizationstring"GRANTED_FOREGROUND"
locationAccuracyAuthorizationradar_location_accuracy_authorizationstring"FULL"
updatedAtradar_updated_attimestamp"2018-06-22T15:23:39.000Z"
segments[*].externalIdradar_segment_external_idsarray[string]["starbucks-visitors"]
topChains[*].slugradar_top_chain_slugsarray[string]["starbucks", "walmart"]
topChains[*].externalIdradar_top_chain_external_idsarray[string]["123", "456"]
geofences[*]._idradar_geofence_idsarray[string]["5b2c0906f5874b001aecfd8e"]Geofences
geofences[*].descriptionradar_geofence_descriptionsarray[string]["Store #123"]Geofences
geofences[*].tagradar_geofence_tagsarray[string]["store"]Geofences
geofences[*].externalIdradar_geofence_external_idsarray[string]["123"]Geofences
place._idradar_place_idstring"59302bcf8f27e8a156bd4f91"Places
place.nameradar_place_namestring"Starbucks"Places
place.categoriesradar_place_categoriesarray[string]["food-beverage", "cafe", "coffee-shop"]Places
place.chain.slugradar_place_chain_slugstring"starbucks"Places
place.chain.nameradar_place_chain_namestring"Starbucks"Places
country.coderadar_region_country_codestring"US"Regions
country.nameradar_region_country_namestring"United States"Regions
state.coderadar_region_state_codestring"MD"Regions
state.nameradar_region_state_namestring"Maryland"Regions
dma.coderadar_region_dma_codestring"26"Regions
dma.nameradar_region_dma_namestring"Baltimore"Regions
postalCode.coderadar_region_postal_codestring"21014"Regions
trip.externalIdradar_trip_external_idstring"299"Trip Tracking
trip.destinationGeofenceTagradar_trip_destination_geofence_tagstring"store"Trip Tracking
trip.destinationGeofenceExternalIdradar_trip_destination_geofence_external_idstring"123"Trip Tracking
beacons[*]._idradar_beacon_idsarray[string]["5b2c0906f5874b001aecfd8f]"Beacons
beacons[*].descriptionradar_beacon_descriptionsarray[string]["Store #123 - Drive-Thru"]Beacons
beacons[*].tagradar_beacon_tagsarray[string]["drive-thru"]Beacons
beacons[*].externalIdradar_beacon_external_idsarray[string]["123"]Beacons

Event mapping#

Radar EventContext TypeSegment Event
user.entered_geofenceGeofencesGeofence Entered
user.exited_geofenceGeofencesGeofence Exited
user.dwelled_in_geofenceGeofencesDwelled in Geofence
user.entered_placePlacesPlace Entered
user.exited_placePlacesPlace Exited
user.entered_region_countryRegionsCountry Entered
user.exited_region_countryRegionsCountry Exited
user.entered_region_stateRegionsState Entered
user.exited_region_stateRegionsState Exited
user.entered_region_dmaRegionsDMA Entered
user.exited_region_dmaRegionsDMA Exited
user.started_tripTrip TrackingTrip Started
user.updated_tripTrip TrackingTrip Updated
user.approaching_trip_destinationTrip TrackingTrip Approaching Destination
user.arrived_at_trip_destinationTrip TrackingTrip Arrived Destination
user.stopped_tripTrip TrackingTrip Stopped
user.entered_beaconBeaconsBeacon Entered
user.exited_beaconBeaconsBeacon Exited

Geofence Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
geofence._idgeofence_idstring"5b2c0906f5874b001aecfd8e"
geofence.descriptiongeofence_descriptionstring"Store #123"
geofence.taggeofence_tagstring"store"
geofence.externalIdgeofence_external_idstring"123"
geofence.metadata[{key}]geofence_metadata_{key}{type}{value}
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

Geofence Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
geofence._idgeofence_idstring"5b2c0906f5874b001aecfd8e"
geofence.descriptiongeofence_descriptionstring"Store #123"
geofence.taggeofence_tagstring"store"
geofence.externalIdgeofence_external_idstring"123"
geofence.metadata[{key}]geofence_metadata_{key}{type}{value}
confidenceconfidencestring"high"
durationdurationnumber (minutes)42.1
foregroundforegroundbooleantrue

Dwelled in Geofence#

Radar Event FieldSegment Event PropertyTypeExample Value
geofence._idgeofence_idstring"5b2c0906f5874b001aecfd8e"
geofence.descriptiongeofence_descriptionstring"Store #123"
geofence.taggeofence_tagstring"store"
geofence.externalIdgeofence_external_idstring"123"
geofence.metadata[{key}]geofence_metadata_{key}{type}{value}
confidenceconfidencestring"high"
durationdurationnumber (minutes)42.1
foregroundforegroundbooleantrue

Place Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
place._idplace_idstring"59302bcf8f27e8a156bd4f91"
place.nameplace_namestring"Starbucks"
place.chain.slugplace_chain_idstring"starbucks"
place.chain.nameplace_chain_namestring"Starbucks"
place.chain.metadata[{key}]place_chain_metadata_{key}{type}{value}
place.categoriesplace_categoriesarray[string]["food-beverage", "cafe", "coffee-shop"]
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

Place Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
place._idplace_idstring"59302bcf8f27e8a156bd4f91"
place.nameplace_namestring"Starbucks"
place.chain.slugplace_chain_idstring"starbucks"
place.chain.nameplace_chain_namestring"Starbucks"
place.chain.metadata[{key}]place_chain_metadata_{key}{type}{value}
place.categoriesplace_categoriesarray[string]["food-beverage", "cafe", "coffee-shop"]
confidenceconfidencestring"high"
durationdurationnumber (minutes)42.1
foregroundforegroundbooleantrue

Country Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"US"
region.nameregion_namestring"United States"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

Country Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"US"
region.nameregion_namestring"United States"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

State Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"MD"
region.nameregion_namestring"Maryland"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

State Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"MD"
region.nameregion_namestring"Maryland"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

DMA Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"26"
region.nameregion_namestring"Baltimore"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

DMA Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
region.coderegion_codestring"26"
region.nameregion_namestring"Baltimore"
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

Trip Started#

Radar Event AttributeSegment Event PropertyTypeExample Value
trip.externalIdtrip_external_idstring"299"
trip.metadata[{key}]trip_metadata_{key}{type}{value}
trip.destinationGeofenceTagtrip_destination_geofence_tagstring"store"
trip.destinationGeofenceExternalIdtrip_destination_geofence_external_idstring"123"
foregroundforegroundbooleantrue

Trip Updated#

Radar Event AttributeSegment Event PropertyTypeExample Value
trip.externalIdtrip_external_idstring"299"
trip.metadata[{key}]trip_metadata_{key}{type}{value}
trip.destinationGeofenceTagtrip_destination_geofence_tagstring"store"
trip.destinationGeofenceExternalIdtrip_destination_geofence_external_idstring"123"
foregroundforegroundbooleantrue

Trip Approaching Destination#

Radar Event AttributeSegment Event PropertyTypeExample Value
trip.externalIdtrip_external_idstring"299"
trip.metadata[{key}]trip_metadata_{key}{type}{value}
trip.destinationGeofenceTagtrip_destination_geofence_tagstring"store"
trip.destinationGeofenceExternalIdtrip_destination_geofence_external_idstring"123"
foregroundforegroundbooleantrue

Trip Arrived Destination#

Radar Event AttributeSegment Event PropertyTypeExample Value
trip.externalIdtrip_external_idstring"299"
trip.metadata[{key}]trip_metadata_{key}{type}{value}
trip.destinationGeofenceTagtrip_destination_geofence_tagstring"store"
trip.destinationGeofenceExternalIdtrip_destination_geofence_external_idstring"123"
foregroundforegroundbooleantrue

Trip Stopped#

Radar Event AttributeSegment Event PropertyTypeExample Value
trip.externalIdtrip_external_idstring"299"
trip.metadata[{key}]trip_metadata_{key}{type}{value}
trip.destinationGeofenceTagtrip_destination_geofence_tagstring"store"
trip.destinationGeofenceExternalIdtrip_destination_geofence_external_idstring"123"
foregroundforegroundbooleantrue

Beacon Entered#

Radar Event AttributeSegment Event PropertyTypeExample Value
beacon._idbeacon_idstring"5b2c0906f5874b001aecfd8f"
beacon.descriptionbeacon_descriptionstring"Store #123 - Drive-Thru"
beacon.tagbeacon_tagstring"drive-thru"
beacon.externalIdbeacon_external_idstring"123"
beacon.metadata[{key}]beacon_metadata_{key}{type}{value}
confidenceconfidencestring"high"
foregroundforegroundbooleantrue

Beacon Exited#

Radar Event AttributeSegment Event PropertyTypeExample Value
beacon._idbeacon_idstring"5b2c0906f5874b001aecfd8f"
beacon.descriptionbeacon_descriptionstring"Store #123 - Drive-Thru"
beacon.tagbeacon_tagstring"drive-thru"
beacon.externalIdbeacon_external_idstring"123"
beacon.metadata[{key}]beacon_metadata_{key}{type}{value}
confidenceconfidencestring"high"
durationdurationnumber (minutes)1.42
foregroundforegroundbooleantrue