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.

The Segment integration is available on the Team plan or higher.

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
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
insights.state.homeradar_insights_state_homebooleanfalseInsights
insights.state.officeradar_insights_state_officebooleanfalseInsights
insights.state.travelingradar_insights_state_travelingbooleantrueInsights
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

Event mapping#

Radar EventContext TypeSegment Event
user.entered_geofenceGeofencesGeofence Entered
user.exited_geofenceGeofencesGeofence Exited
user.entered_placePlacesPlace Entered
user.exited_placePlacesPlace Exited
user.entered_homeInsightsHome Entered
user.exited_homeInsightsHome Exited
user.entered_officeInsightsOffice Entered
user.exited_officeInsightsOffice Exited
user.started_travelingInsightsTraveling Started
user.stopped_travelingInsightsTraveling Stopped
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

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"

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

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"

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

Home Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Home Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Office Entered#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Office Exited#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Traveling Started#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Traveling Stopped#

Radar Event FieldSegment Event PropertyTypeExample Value
confidenceconfidencestring"high"

Country Entered#

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

Country Exited#

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

State Entered#

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

State Exited#

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

DMA Entered#

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

DMA Exited#

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