Skip to main content

mParticle

Radar can send events and user attributes to mParticle as an input feed. You can use events and user attributes to build audiences in mParticle, and mParticle can send events and user attributes to hundreds of outputs.

The mParticle SDK can also install and initialize the Radar SDK as a kit.

Use the mParticle integration to build location-based audiences and to forward location events and user context to any outputs.

The mParticle integration is available on the Enterprise plan.

Configuration#

Feed#

To configure the feed, in mParticle, add Radar input feeds for iOS and Android and copy your API keys and secrets.

Then, on the Radar Integrations page under mParticle Feed, set Enabled to Yes and paste your API keys and secrets.

Whenever events are generated, Radar will send events and user attributes to mParticle. Events and user attributes from iOS devices will be sent to the iOS input feed, and events and user attributes from Android devices will be sent to the Android input feed. The Radar Test environment automatically maps to the Development environment in mParticle, and the Radar Live environment automatically maps to the Production environment in mParticle.

By default, Radar userId maps to mParticle customerid for logged in users. However, you can specify a custom mapping by setting Radar metadata.mParticleCustomerId. For example, on iOS:

// track logged in users with custom userId mapping (not required if using default mapping)
Radar.setMetadata(["mParticleCustomerId": customerid])

Kit#

To configure the kit, on the Radar Settings page under Keys, copy your test and live publishable keys. Then, in mParticle, add and enable Radar outputs for iOS and Android, paste your keys, and choose whether to run automatically.

Install the kit using CocoaPods or Carthage on iOS and Gradle on Android. See the iOS kit code and readme, Android kit code and readme, and mParticle Kit documentation for Radar.

The kit will initialize the Radar SDK and identify the user with the mParticle customer ID. After version 8.0.2 of the iOS kit and 5.15.1 of the Android kit, Radar will also set metadata.mParticleId to the MPID. In addition, if you chose to run automatically and the user has granted permissions, the kit will automatically track the user's location in the foreground on app open and/or in the background.

User mapping#

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

Radar User FieldmParticle User AttributeTypeExample ValueContext Type
metadata.mParticleIdmpidstring"4294967296"
metadata.mParticleCustomerId or userIdcustomeridstring"1"
deviceIdios_idfv or android_uuidstring"10974a2ee035770b9"
locationcurrent_locationlocation(39.525665, -76.350663)
_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
insights.state.homeradar_insights_state_homebooleanfalseInsights
insights.state.home.confidenceradar_insights_location_home_confidencestring"high"Insights
insights.state.home.country.coderadar_insights_location_home_region_country_codestring"US"Regions
insights.state.home.country.nameradar_insights_location_home_region_country_namestring"United States"Regions
insights.state.home.state.coderadar_insights_location_home_region_state_codestring"MD"Regions
insights.state.home.state.nameradar_insights_location_home_region_state_namestring"Maryland"Regions
insights.state.home.dma.coderadar_insights_location_home_region_dma_codestring"26"Regions
insights.state.home.dma.nameradar_insights_location_home_region_dma_namestring"Baltimore"Regions
insights.state.home.postalCode.coderadar_insights_location_home_region_postal_codestring"21014"Regions
insights.state.officeradar_insights_state_officebooleanfalseInsights
insights.state.office.confidenceradar_insights_location_office_confidencestring"high"Insights
insights.state.office.country.coderadar_insights_location_office_region_country_codestring"US"Regions
insights.state.office.country.nameradar_insights_location_office_region_country_namestring"United States"Regions
insights.state.office.state.coderadar_insights_location_office_region_state_codestring"MD"Regions
insights.state.office.state.nameradar_insights_location_office_region_state_namestring"Maryland"Regions
insights.state.office.dma.coderadar_insights_location_office_region_dma_codestring"26"Regions
insights.state.office.dma.nameradar_insights_location_office_region_dma_namestring"Baltimore"Regions
insights.state.office.postalCode.coderadar_insights_location_office_region_postal_codestring"21014"Regions
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#

user.entered_geofence#

Radar Event FieldmParticle Event AttributeTypeExample 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"

user.exited_geofence#

Radar Event FieldmParticle Event AttributeTypeExample 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

user.entered_place#

Radar Event FieldmParticle Event AttributeTypeExample Value
place._idplace_idstring"59302bcf8f27e8a156bd4f91"
place.nameplace_namestring"Starbucks"
place.chain.slugplace_chain_slugstring"starbucks"
place.chain.nameplace_chain_namestring"Starbucks"
place.categoriesplace_categoriesstring (comma-separated)"food-beverage,cafe,coffee-shop"
confidenceconfidencestring"high"

user.exited_place#

Radar Event FieldmParticle Event AttributeTypeExample Value
place._idplace_idstring"59302bcf8f27e8a156bd4f91"
place.nameplace_namestring"Target"
place.chain.slugplace_chain_slugstring"target"
place.chain.nameplace_chain_namestring"Target"
place.categoriesplace_categoriesstring (comma-separated)"food-beverage,cafe,coffee-shop"
confidenceconfidencestring"high"
durationdurationnumber (minutes)42.1

user.entered_home#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.exited_home#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.entered_office#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.exited_office#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.started_traveling#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.stopped_traveling#

Radar Event FieldmParticle Event AttributeTypeExample Value
confidenceconfidencestring"high"

user.entered_region_country#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"US"
region.nameregion_namestring"United States"
confidenceconfidencestring"high"

user.exited_region_country#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"US"
region.nameregion_namestring"United States"
confidenceconfidencestring"high"

user.entered_region_state#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"MD"
region.nameregion_namestring"Maryland"
confidenceconfidencestring"high"

user.exited_region_state#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"MD"
region.nameregion_namestring"Maryland"
confidenceconfidencestring"high"

user.entered_region_dma#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"26"
region.nameregion_namestring"Baltimore"
confidenceconfidencestring"high"

user.exited_region_dma#

Radar Event AttributemParticle Event AttributeTypeExample Value
region.coderegion_codestring"26"
region.nameregion_namestring"Baltimore"
confidenceconfidencestring"high"