Skip to main content

Mixpanel

Radar can send events and user properties to Mixpanel.

Use the Mixpanel integration to enrich behavioral events with location context, measure the ROI of location-based features, and build location-based user segments.

Configuration#

On the Mixpanel Project Settings page, copy the token from the Access Keys section. Then, on the Radar Integrations page under Mixpanel, set Enabled to Yes and paste your token. Note that you can set separate tokens for the Test and Live environments.

Whenever events are generated, Radar will send custom events and user properties to Mixpanel.

By default, Radar userId maps to Mixpanel distinct ID for logged in users. However, you can specify a custom mapping by setting Radar metadata.mixpanelDistinctId. For example, on iOS:

Radar.setMetadata(["mixpanelDistinctId": distinctIdValue])

User mapping#

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

Radar User FieldMixpanel User PropertyTypeExample ValueContext Type
location.coordinates[1]$latitudenumber39.525665
location.coordinates[0]$longitudenumber-76.350663
metadata.mixpanelDistinctId or userIdDistinct IDstring"1"
location.coordinates[0]Radar Location Longitudenumber-76.350663
location.coordinates[1]Radar Location Latitudenumber39.525665
locationAuthorizationRadar Location Authorizationstring"GRANTED_FOREGROUND"
locationAccuracyAuthorizationRadar Location Accuracy Authorizationstring"FULL"
_idRadar IDstring"5b2c0906f5874b001aecfd8d"
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 TypeMixpanel Event
user.entered_geofenceGeofencesRadar Geofence Entered
user.exited_geofenceGeofencesRadar Geofence Exited
user.dwelled_in_geofenceGeofencesRadar Dwelled in Geofence
user.entered_placePlacesRadar Place Entered
user.exited_placePlacesRadar Place Exited
user.entered_region_countryRegionsRadar Country Entered
user.exited_region_countryRegionsRadar Country Exited
user.entered_region_stateRegionsRadar State Entered
user.exited_region_stateRegionsRadar State Exited
user.entered_region_dmaRegionsRadar DMA Entered
user.exited_region_dmaRegionsRadar DMA Exited
user.started_tripTrip TrackingRadar Started Trip
user.updated_tripTrip TrackingRadar Updated Trip
user.approaching_trip_destinationTrip TrackingRadar Approaching Trip Destination
user.arrived_at_trip_destinationTrip TrackingRadar Arrived at Trip Destination
user.stopped_tripTrip TrackingRadar Stopped Trip
user.entered_beaconBeaconsRadar Beacon Entered
user.exited_beaconBeaconsRadar Beacon Exited

Radar Geofence Entered#

Radar Event FieldMixpanel Event PropertyTypeExample
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"
foregroundForegroundstringtrue

Radar Geofence Exited#

Radar Event FieldMixpanel Event PropertyTypeExample
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
foregroundForegroundstringtrue

Radar Dwelled in Geofence#

Radar Event FieldMixpanel Event PropertyTypeExample
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)5
foregroundForegroundstringtrue

Radar Place Entered#

Radar Event FieldMixpanel Event PropertyTypeExample
place._idPlace IDstring"59302bcf8f27e8a156bd4f91"
place.namePlace Namestring"Starbucks"
place.chain.slugPlace Chain IDstring"starbucks"
place.chain.namePlace Chain Namestring"Starbucks"
place.categoriesPlace Categoriesarray[string]["food-beverage", "cafe", "coffee-shop"]
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar Place Exited#

Radar Event FieldMixpanel Event PropertyTypeExample
place._idPlace IDstring"59302bcf8f27e8a156bd4f91"
place.namePlace Namestring"Starbucks"
place.chain.slugPlace Chain IDstring"starbucks"
place.chain.namePlace Chain Namestring"Starbucks"
place.categoriesPlace Categoriesarray[string]["food-beverage", "cafe", "coffee-shop"]
confidenceConfidencestring"high"
durationDurationnumber (minutes)42.1
foregroundForegroundstringtrue

Radar Country Entered#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"US"
region.nameRegion Namestring"United States"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar Country Exited#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"US"
region.nameRegion Namestring"United States"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar State Entered#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"MD"
region.nameRegion Namestring"Maryland"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar State Exited#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"MD"
region.nameRegion Namestring"Maryland"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar DMA Entered#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"26"
region.nameRegion Namestring"Baltimore"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar DMA Exited#

Radar Event FieldMixpanel Event PropertyTypeExample Value
region.codeRegion Codestring"26"
region.nameRegion Namestring"Baltimore"
confidenceConfidencestring"high"
foregroundForegroundstringtrue

Radar Started Trip#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Updated Trip#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Approaching Trip Destination#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Arrived at Trip Destination#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Stopped Trip#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Beacon Entered#

Radar Event AttributeMixpanel 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"
foregroundForegroundstringtrue

Radar Beacon Exited#

Radar Event AttributeMixpanel 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
foregroundForegroundstringtrue